Record Class CovarianceData
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase3.CovarianceData
record CovarianceData(IToken token, String errorMessage, ISymbol fromVar, ISymbol toVar)
extends Record
Used for checking covariance based on a variable.
Navigate the variable to get the type, then check the type.
Clearly it is also possible that either the from or to could be missing or even their types could be missing.
-
Constructor Summary
ConstructorsConstructorDescriptionCovarianceData(IToken token, String errorMessage, ISymbol fromVar, ISymbol toVar) Creates an instance of aCovarianceDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.fromVar()Returns the value of thefromVarrecord component.final inthashCode()Returns a hash code value for this object.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.toVar()Returns the value of thetoVarrecord component.
-
Constructor Details
-
CovarianceData
Creates an instance of aCovarianceDatarecord class.- Parameters:
token- the value for thetokenrecord componenterrorMessage- the value for theerrorMessagerecord componentfromVar- the value for thefromVarrecord componenttoVar- the value for thetoVarrecord component
-
-
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). -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-
fromVar
Returns the value of thefromVarrecord component.- Returns:
- the value of the
fromVarrecord component
-
toVar
Returns the value of thetoVarrecord component.- Returns:
- the value of the
toVarrecord component
-