Module org.neo4j.cypherdsl.core
Package org.neo4j.cypherdsl.core
Record Class StatementCatalog.Token
java.lang.Object
java.lang.Record
org.neo4j.cypherdsl.core.StatementCatalog.Token
- Record Components:
type
- The type of this tokenvalue
- The concrete value
- All Implemented Interfaces:
Comparable<StatementCatalog.Token>
- Enclosing interface:
StatementCatalog
public static record StatementCatalog.Token(StatementCatalog.Token.Type type, String value)
extends Record
implements Comparable<StatementCatalog.Token>
A token can either describe a node label or a relationship type.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The specific token type. -
Constructor Summary
ConstructorDescriptionToken
(StatementCatalog.Token.Type type, String value) Creates an instance of aToken
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static StatementCatalog.Token
Turns a specific node label into a more abstract token.static StatementCatalog.Token
Turns a specificlabel
into a more abstract token.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.static StatementCatalog.Token
Turns a specific relationship type into a more abstract tokenvalue()
Returns the value of thevalue
record component.
-
Constructor Details
-
Method Details
-
label
Turns a specificlabel
into a more abstract token.- Parameters:
label
- A label, must not be null.- Returns:
- A token
-
label
Turns a specific node label into a more abstract token.- Parameters:
label
- A label, must not be null.- Returns:
- A token
-
type
Turns a specific relationship type into a more abstract token- Parameters:
type
- A string representing a type, must not be null.- Returns:
- A token
-
compareTo
- Specified by:
compareTo
in interfaceComparable<StatementCatalog.Token>
-
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)
. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-