Package hydra.json.model
Class Value.Object_
- java.lang.Object
-
- hydra.json.model.Value
-
- hydra.json.model.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hydra.json.model.Value
Value.Array, Value.Boolean_, Value.Null, Value.Number_, Value.Object_, Value.PartialVisitor<R>, Value.String_, Value.Visitor<R>
-
-
Constructor Summary
Constructors Constructor Description Object_(java.util.List<Pair<java.lang.String,Value>> value)Constructs an immutableValue.Object_.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(Value.Visitor<R> visitor)Dispatch tovisitor.intcompareTo(Value other)booleanequals(java.lang.Object other)inthashCode()
-
-
-
Constructor Detail
-
Object_
public Object_(java.util.List<Pair<java.lang.String,Value>> value)
Constructs an immutableValue.Object_.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Value other)
- Specified by:
compareToin interfacejava.lang.Comparable<Value>
-
accept
public <R> R accept(Value.Visitor<R> visitor)
Dispatch tovisitor.
-
-