Class Value.Object_

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Value>
    Enclosing class:
    Value

    public static final class Value.Object_
    extends Value
    implements java.io.Serializable
    A JSON object as an ordered list of key/value pairs. The ordering preserves the declaration order of the record from which the object was encoded, rather than alphabetizing keys. As a consequence, equality of Value objects is order-sensitive: two objects with the same pairs in a different order are equal as JSON, but not as Hydra Values.
    See Also:
    Serialized Form
    • Field Detail

      • value

        public final java.util.List<Pair<java.lang.String,​Value>> value
    • Constructor Detail

      • Object_

        public Object_​(java.util.List<Pair<java.lang.String,​Value>> value)
        Constructs an immutable Value.Object_.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(Value other)
        Specified by:
        compareTo in interface java.lang.Comparable<Value>
      • accept

        public <R> R accept​(Value.Visitor<R> visitor)
        Dispatch to visitor.
        Specified by:
        accept in class Value