Package io.github.connellite.jdbc.parser
Record Class Token
java.lang.Object
java.lang.Record
io.github.connellite.jdbc.parser.Token
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
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.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Field Details
-
EOF
public static final int EOF- See Also:
-
COMMENT
public static final int COMMENT- See Also:
-
LITERAL
public static final int LITERAL- See Also:
-
QUOTED_TEXT
public static final int QUOTED_TEXT- See Also:
-
DOUBLE_QUOTED_TEXT
public static final int DOUBLE_QUOTED_TEXT- See Also:
-
NAMED_PARAM
public static final int NAMED_PARAM- See Also:
-
POSITIONAL_PARAM
public static final int POSITIONAL_PARAM- See Also:
-
ESCAPED_TEXT
public static final int ESCAPED_TEXT- See Also:
-
-
Constructor Details
-
Token
Creates an instance of aTokenrecord class.- Parameters:
type- the value for thetyperecord componenttext- the value for thetextrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-