Interface Structure

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 Details

    • isEmpty

      boolean isEmpty()
      Boolean indicating if this structure is empty.
      Returns:
      boolean for emptiness
    • keySet

      Set<String> keySet()
      Get all keys.
      Returns:
      the set of keys
    • getValue

      Value getValue(String key)
      Get the value indexed by key.
      Parameters:
      key - String the key.
      Returns:
      the Value
    • asMap

      Map<String,Value> asMap()
      Get all values, as a map of Values.
      Returns:
      all attributes on the structure into a Map
    • asUnmodifiableMap

      Map<String,Value> asUnmodifiableMap()
      Get all values, as a map of Values.
      Returns:
      all attributes on the structure into a Map
    • asObjectMap

      Map<String,Object> asObjectMap()
      Get all values, with as a map of Object.
      Returns:
      all attributes on the structure into a Map
    • convertValue

      default Object convertValue(Value value)
      Converts the Value into its equivalent primitive type.
      Parameters:
      value - - Value object to convert
      Returns:
      an Object containing the primitive type, or null.
    • mapToStructure

      static Structure mapToStructure(Map<String,Object> map)
      Transform an object map to a Structure type.
      Parameters:
      map - map of objects
      Returns:
      a Structure object in the SDK format