Record Class TypeArgumentMapper.TypeParameterMapping
java.lang.Object
java.lang.Record
org.checkerframework.framework.util.TypeArgumentMapper.TypeParameterMapping
- Record Components:
subtypeIndex- the index of a type parameter of the subtypesupertypeIndex- the index of the corresponding type parameter of the supertype
- Enclosing class:
TypeArgumentMapper
public static record TypeArgumentMapper.TypeParameterMapping(int subtypeIndex, int supertypeIndex)
extends Record
A correspondence between a subtype's type parameter and a supertype's type parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionTypeParameterMapping(int subtypeIndex, int supertypeIndex) Creates an instance of aTypeParameterMappingrecord class. -
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.intReturns the value of thesubtypeIndexrecord component.intReturns the value of thesupertypeIndexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TypeParameterMapping
public TypeParameterMapping(int subtypeIndex, int supertypeIndex) Creates an instance of aTypeParameterMappingrecord class.- Parameters:
subtypeIndex- the value for thesubtypeIndexrecord componentsupertypeIndex- the value for thesupertypeIndexrecord 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 with '=='. -
subtypeIndex
public int subtypeIndex()Returns the value of thesubtypeIndexrecord component.- Returns:
- the value of the
subtypeIndexrecord component
-
supertypeIndex
public int supertypeIndex()Returns the value of thesupertypeIndexrecord component.- Returns:
- the value of the
supertypeIndexrecord component
-