Record Class JSONValue
java.lang.Object
java.lang.Record
org.opendaylight.yangtools.yang.data.codec.gson.JSONValue
- Record Components:
rawString
- unescaped stringkind
- string kind
A serialized JSON string, indicating what kind of value it represents.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JSONValue
The equivalent onEmpty.value()
.static final JSONValue
The equivalent onBoolean.FALSE
.static final JSONValue
The equivalent onBoolean.TRUE
. -
Constructor Summary
ConstructorsConstructorDescriptionJSONValue
(String rawString, JSONValue.Kind kind) Creates an instance of aJSONValue
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.kind()
Returns the value of thekind
record component.Returns the value of therawString
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
FALSE
The equivalent onBoolean.FALSE
. -
TRUE
The equivalent onBoolean.TRUE
. -
EMPTY
The equivalent onEmpty.value()
.
-
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
rawString
Returns the value of therawString
record component.- Returns:
- the value of the
rawString
record component
-
kind
Returns the value of thekind
record component.- Returns:
- the value of the
kind
record component
-