Record Class SimpleParameterizedType

java.lang.Object
java.lang.Record
org.jhotdraw8.fxcollection.typesafekey.SimpleParameterizedType
All Implemented Interfaces:
ParameterizedType, Type

public record SimpleParameterizedType(@NonNull Type rawType, @NonNull Type[] actualTypeArguments) extends Record implements ParameterizedType
  • Constructor Details

    • SimpleParameterizedType

      public SimpleParameterizedType(@NonNull Type rawType, @NonNull Type... actualTypeArguments)
      Creates an instance of a SimpleParameterizedType record class.
      Parameters:
      rawType - the value for the rawType record component
      actualTypeArguments - the value for the actualTypeArguments record component
  • Method Details

    • getTypeArgument

      public @NonNull Type getTypeArgument(int i)
    • getTypeArgumentCount

      public int getTypeArgumentCount()
    • getTypeName

      public @NonNull String getTypeName()
      Specified by:
      getTypeName in interface Type
    • getActualTypeArguments

      public Type @NonNull [] getActualTypeArguments()
      Specified by:
      getActualTypeArguments in interface ParameterizedType
    • getRawType

      public @NonNull Type getRawType()
      Specified by:
      getRawType in interface ParameterizedType
    • getOwnerType

      public @Nullable Type getOwnerType()
      Specified by:
      getOwnerType in interface ParameterizedType
    • equals

      public boolean equals(@Nullable Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • rawType

      public @NonNull Type rawType()
      Returns the value of the rawType record component.
      Returns:
      the value of the rawType record component
    • actualTypeArguments

      public @NonNull Type[] actualTypeArguments()
      Returns the value of the actualTypeArguments record component.
      Returns:
      the value of the actualTypeArguments record component