Package org.ek9lang.compiler.phase3
Record Class TypeCompatibilityData
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase3.TypeCompatibilityData
TO be used when checking the left hand side and the right hand side with specific operators.
-
Constructor Summary
ConstructorDescriptionTypeCompatibilityData
(IToken location, ISymbol lhs, ISymbol rhs) Creates an instance of aTypeCompatibilityData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.lhs()
Returns the value of thelhs
record component.location()
Returns the value of thelocation
record component.rhs()
Returns the value of therhs
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TypeCompatibilityData
Creates an instance of aTypeCompatibilityData
record class.- Parameters:
location
- the value for thelocation
record componentlhs
- the value for thelhs
record componentrhs
- the value for therhs
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)
. -
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
lhs
Returns the value of thelhs
record component.- Returns:
- the value of the
lhs
record component
-
rhs
Returns the value of therhs
record component.- Returns:
- the value of the
rhs
record component
-