Package org.ek9lang.compiler.phase1
Record Class ConflictingTokens
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase1.ConflictingTokens
Designed to encapsulate the fact that two token are in conflict for a Symbol.
Quite abstract in nature, but may have a few use cases.
-
Constructor Summary
ConstructorDescriptionConflictingTokens
(IToken tokenInError, IToken firstUse, ISymbol symbol) Creates an instance of aConflictingTokens
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.firstUse()
Returns the value of thefirstUse
record component.final int
hashCode()
Returns a hash code value for this object.symbol()
Returns the value of thesymbol
record component.Returns the value of thetokenInError
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ConflictingTokens
Creates an instance of aConflictingTokens
record class.- Parameters:
tokenInError
- the value for thetokenInError
record componentfirstUse
- the value for thefirstUse
record componentsymbol
- the value for thesymbol
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
tokenInError
Returns the value of thetokenInError
record component.- Returns:
- the value of the
tokenInError
record component
-
firstUse
Returns the value of thefirstUse
record component.- Returns:
- the value of the
firstUse
record component
-
symbol
Returns the value of thesymbol
record component.- Returns:
- the value of the
symbol
record component
-