Record Class JsonPath
java.lang.Object
java.lang.Record
dev.blaauwendraad.masker.json.path.JsonPath
The library represents a jsonpath as an array of segments.
See
JsonPathParser
for details.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.The last segment of the jsonpath key is an actual target key.int
hashCode()
Returns a hash code value for this object.String[]
segments()
Returns the value of thesegments
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
JsonPath
Creates an instance of aJsonPath
record class.- Parameters:
segments
- the value for thesegments
record component
-
-
Method Details
-
getQueryArgument
The last segment of the jsonpath key is an actual target key.- Returns:
- the last segment of the jsonpath key.
-
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. -
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
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
segments
Returns the value of thesegments
record component.- Returns:
- the value of the
segments
record component
-