Enum DefaultValueStructureAccessor
java.lang.Object
java.lang.Enum<DefaultValueStructureAccessor>
de.xima.fc.workflow.processor.value.DefaultValueStructureAccessor
- All Implemented Interfaces:
IValueStructureAccessor, Serializable, Comparable<DefaultValueStructureAccessor>
public enum DefaultValueStructureAccessor
extends Enum<DefaultValueStructureAccessor>
implements IValueStructureAccessor
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionasPrimitive(Object value) If the value is a primitive, returns the unwrapped primitive value.booleanChecks if the given value is a list of items.booleanChecks if the given value is a map of key-value pairs.booleanisPrimitive(Object value) Checks if the given value is a primitive value, i.e. not a container (list or map).If the value is a list, gets the item at the given index.intIf the value is a list, gets the number of items in the list.If the value is a map, gets the value for the given key.Collection<?> If the value is a map, gets the keys of the map.Returns the enum constant of this type with the specified name.static DefaultValueStructureAccessor[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance of the default value structure accessor.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
asPrimitive
Description copied from interface:IValueStructureAccessorIf the value is a primitive, returns the unwrapped primitive value. E.g. for a boolean, should return aBoolean. Unspecified behavior if the value is not a primitive.- Specified by:
asPrimitivein interfaceIValueStructureAccessor- Parameters:
value- The primitive value to access.- Returns:
- The primitive value.
-
isList
Description copied from interface:IValueStructureAccessorChecks if the given value is a list of items.- Specified by:
isListin interfaceIValueStructureAccessor- Parameters:
value- The value to check.- Returns:
- True if the value is a list, false otherwise.
-
isMap
Description copied from interface:IValueStructureAccessorChecks if the given value is a map of key-value pairs.- Specified by:
isMapin interfaceIValueStructureAccessor- Parameters:
value- The value to check.- Returns:
- True if the value is a map, false otherwise.
-
isPrimitive
Description copied from interface:IValueStructureAccessorChecks if the given value is a primitive value, i.e. not a container (list or map).- Specified by:
isPrimitivein interfaceIValueStructureAccessor- Parameters:
value- The value to check.- Returns:
- True if the value is a primitive, false otherwise.
-
listGet
Description copied from interface:IValueStructureAccessorIf the value is a list, gets the item at the given index. Unspecified behavior if the value is not a list.- Specified by:
listGetin interfaceIValueStructureAccessor- Parameters:
list- The list with items to access.index- The index of the item to access.- Returns:
- The item at the given index.
-
listSize
Description copied from interface:IValueStructureAccessorIf the value is a list, gets the number of items in the list. Unspecified behavior if the value is not a list.- Specified by:
listSizein interfaceIValueStructureAccessor- Parameters:
value- The list to get the size of.- Returns:
- The number of items in the list.
-
mapGet
Description copied from interface:IValueStructureAccessorIf the value is a map, gets the value for the given key. Unspecified behavior if the value is not a map.- Specified by:
mapGetin interfaceIValueStructureAccessor- Parameters:
map- The map with key-value pairs to access.key- The key of the value to access.- Returns:
- The value for the given key, or null if the key does not exist in the map.
-
mapKeys
Description copied from interface:IValueStructureAccessorIf the value is a map, gets the keys of the map. Unspecified behavior if the value is not a map.- Specified by:
mapKeysin interfaceIValueStructureAccessor- Parameters:
map- The map with key-value pairs to access.- Returns:
- The keys of the map.
-