java.lang.Object
java.lang.Record
org.aya.tyck.error.UnifyInfo.Comparison
- Enclosing class:
UnifyInfo
public static record UnifyInfo.Comparison(@NotNull Term actual, @NotNull Term expected, TermComparator.FailureData failureData)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionComparison(@NotNull Term actual, @NotNull Term expected, TermComparator.FailureData failureData) Creates an instance of aComparisonrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Termactual()Returns the value of theactualrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Termexpected()Returns the value of theexpectedrecord component.Returns the value of thefailureDatarecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Comparison
public Comparison(@NotNull @NotNull Term actual, @NotNull @NotNull Term expected, @NotNull TermComparator.FailureData failureData) Creates an instance of aComparisonrecord class.- Parameters:
actual- the value for theactualrecord componentexpected- the value for theexpectedrecord componentfailureData- the value for thefailureDatarecord 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). -
actual
Returns the value of theactualrecord component.- Returns:
- the value of the
actualrecord component
-
expected
Returns the value of theexpectedrecord component.- Returns:
- the value of the
expectedrecord component
-
failureData
Returns the value of thefailureDatarecord component.- Returns:
- the value of the
failureDatarecord component
-