Record Class Property<N>
java.lang.Object
java.lang.Record
ca.marcusdunn.jsonlens.model.Property<N>
- Type Parameters:
N- the node type of the JSON model- Record Components:
name- the member namevalue- the member value
A member of a JSON object: a name and a value (RFC 9535, Section 1.1).
The name is a JsonString in the representation of the model, so a model over bytes does not
have to decode each name. Use JsonString.of(String) for a String name.
Two properties are equal if their names have the same scalar values and their values are equal.
-
Constructor Summary
ConstructorsConstructorDescriptionProperty(JsonString name, N value) Creates an instance of aPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
-
toString
-
name
-
value
-