Interface IVoidValueDescriptor
- All Superinterfaces:
IAttributeConfigurable<IValueDescriptor<Void, IVoidValueBuilder>>, IValueDescriptor<Void, IVoidValueBuilder>, Serializable
A
IValueDescriptor for a void value. The value must be identical to null.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanacceptsValue(Object value, IValueAcceptanceCriteria criteria) Tests whether the given value conforms to the restrictions imposed by this value descriptor.default EValueTypeGets the basic type of the value described by this value descriptor.Gets the Java class of the values described by this descriptor.default IVoidValueDescriptorwithAddedAttribute(String key, Object value) Gets a new instance with the attribute at the given key changed to the given value.default IVoidValueDescriptorwithAddedAttributes(Map<String, Object> newAttributes) Gets a new instance with the attributes changed to the given map of attributes.default IVoidValueDescriptorwithAttributes(Map<String, Object> attributes) Gets a new instance with the attributes changed to the given map of attributes.default IVoidValueDescriptorwithDefaultValue(Object defaultValue) Gets a new value descriptor with the default value changed to the given value.default IVoidValueDescriptorwithDescription(String description) Deprecated.Methods inherited from interface IAttributeConfigurable
getAttribute, getAttribute, getBooleanAttribute, getBooleanAttribute, getFloatAttribute, getFloatAttribute, getIntegerAttribute, getIntegerAttribute, getStringAttribute, getStringAttributeMethods inherited from interface IValueDescriptor
acceptsValue, asAny, asBoolean, asConst, asFloat, asInteger, asLargeString, asList, asList, asMap, asMap, asNull, asRecord, asString, asTuple, asUnion, asUnion, asVoid, builder, builder, configure, getAttributes, getDefaultValue, getDescription, getFullType, getFullTypeWithRestrictions, getKnownProperties, getKnownProperties, intersect, is, match, unwrap
-
Method Details
-
acceptsValue
Description copied from interface:IValueDescriptorTests whether the given value conforms to the restrictions imposed by this value descriptor. Allows you to specify the acceptance criteria to check that control which restrictions are actually checked.- Specified by:
acceptsValuein interfaceIValueDescriptor<Void, IVoidValueBuilder>- Parameters:
value- A value to check.- Returns:
truewhen the given value conforms to the restrictions imposed by this value descriptor,falseotherwise.
-
getBaseType
Description copied from interface:IValueDescriptorGets the basic type of the value described by this value descriptor.- Specified by:
getBaseTypein interfaceIValueDescriptor<Void, IVoidValueBuilder>- Returns:
- The value's basic type.
-
getJavaClass
Description copied from interface:IValueDescriptorGets the Java class of the values described by this descriptor.- Specified by:
getJavaClassin interfaceIValueDescriptor<Void, IVoidValueBuilder>- Returns:
- The value's Java class.
-
withAddedAttribute
Description copied from interface:IAttributeConfigurableGets a new instance with the attribute at the given key changed to the given value.- Specified by:
withAddedAttributein interfaceIAttributeConfigurable<IValueDescriptor<Void, IVoidValueBuilder>>- Parameters:
key- The attribute key.value- The attribute value.- Returns:
- A new instance with the new attribute.
-
withAddedAttributes
Description copied from interface:IAttributeConfigurableGets a new instance with the attributes changed to the given map of attributes. Preserves other existing attributes and only adds or replaces the given ones.- Specified by:
withAddedAttributesin interfaceIAttributeConfigurable<IValueDescriptor<Void, IVoidValueBuilder>>- Parameters:
newAttributes- The new attributes to add (or replace).- Returns:
- A new instance with the current attributes plus the given attributes.
-
withAttributes
Description copied from interface:IAttributeConfigurableGets a new instance with the attributes changed to the given map of attributes. Replaces all existing attributes.- Specified by:
withAttributesin interfaceIAttributeConfigurable<IValueDescriptor<Void, IVoidValueBuilder>>- Parameters:
attributes- The new attributes.- Returns:
- A new instance with the given attributes.
-
withDefaultValue
Description copied from interface:IValueDescriptorGets a new value descriptor with the default value changed to the given value.- Specified by:
withDefaultValuein interfaceIValueDescriptor<Void, IVoidValueBuilder>- Parameters:
defaultValue- The new default value. May be changed when it does not conform to the restrictions imposed by this descriptor.- Returns:
- A new descriptor with the default value.
-
withDescription
Deprecated.Description copied from interface:IValueDescriptorGets a new value descriptor with the description changed to the given description.- Specified by:
withDescriptionin interfaceIValueDescriptor<Void, IVoidValueBuilder>- Parameters:
description- The new description.- Returns:
- A new descriptor with the given description.
-