Record Class SingularQuery
java.lang.Object
java.lang.Record
ca.marcusdunn.jsonlens.path.core.query.SingularQuery
- Record Components:
identifier- the start of the querysegments- the segments, in order
- All Implemented Interfaces:
ComparableExpression
public record SingularQuery(Identifier identifier, List<SingularSegment> segments)
extends Record
implements ComparableExpression
A singular query: a query that selects at most one node (RFC 9535, Section 2.3.5.1). It has
only name segments and index segments.
-
Constructor Summary
ConstructorsConstructorDescriptionSingularQuery(Identifier identifier, List<SingularSegment> segments) Makes a singular query. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theidentifierrecord component.segments()Returns the value of thesegmentsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SingularQuery
Makes a singular query.- Parameters:
identifier- the start of the querysegments- the segments, in order
-
-
Method Details
-
toString
-
hashCode
-
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). -
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
segments
-