- All Known Subinterfaces:
EvaluationContext,TrackingEventDetails
- All Known Implementing Classes:
ImmutableContext,ImmutableStructure,ImmutableTrackingEventDetails,MutableContext,MutableStructure,MutableTrackingEventDetails
public interface Structure
Structure represents a potentially nested object type which is used to represent
structured data.-
Method Summary
Modifier and TypeMethodDescriptionasMap()Get all values, as a map of Values.Get all values, with as a map of Object.Get all values, as a map of Values.default ObjectconvertValue(Value value) Converts the Value into its equivalent primitive type.Get the value indexed by key.booleanisEmpty()Boolean indicating if this structure is empty.keySet()Get all keys.static StructuremapToStructure(Map<String, Object> map) Transform an object map to aStructuretype.
-
Method Details
-
isEmpty
boolean isEmpty()Boolean indicating if this structure is empty.- Returns:
- boolean for emptiness
-
keySet
Get all keys.- Returns:
- the set of keys
-
getValue
Get the value indexed by key.- Parameters:
key- String the key.- Returns:
- the Value
-
asMap
Get all values, as a map of Values.- Returns:
- all attributes on the structure into a Map
-
asUnmodifiableMap
Get all values, as a map of Values.- Returns:
- all attributes on the structure into a Map
-
asObjectMap
Get all values, with as a map of Object.- Returns:
- all attributes on the structure into a Map
-
convertValue
Converts the Value into its equivalent primitive type.- Parameters:
value- - Value object to convert- Returns:
- an Object containing the primitive type, or null.
-
mapToStructure
Transform an object map to aStructuretype.- Parameters:
map- map of objects- Returns:
- a Structure object in the SDK format
-