Package com.pixelmonmod.pixelmon.api.ui
Record Class InputElementType.Data<T extends InputType<A>,A>
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.ui.InputElementType.Data<T,A>
- Enclosing class:
- InputElementType<T extends InputType<?>>
-
Constructor Summary
ConstructorDescriptionData
(com.google.common.reflect.TypeToken<A> typeToken, BiFunction<A, net.minecraft.network.chat.Component, T> constructor) Creates an instance of aData
record class. -
Method Summary
Modifier and TypeMethodDescriptionBiFunction<A,
net.minecraft.network.chat.Component, T> Returns the value of theconstructor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.com.google.common.reflect.TypeToken<A>
Returns the value of thetypeToken
record component.
-
Constructor Details
-
Data
public Data(com.google.common.reflect.TypeToken<A> typeToken, BiFunction<A, net.minecraft.network.chat.Component, T> constructor) Creates an instance of aData
record class.- Parameters:
typeToken
- the value for thetypeToken
record componentconstructor
- the value for theconstructor
record component
-
-
Method Details
-
construct
-
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)
. -
typeToken
Returns the value of thetypeToken
record component.- Returns:
- the value of the
typeToken
record component
-
constructor
Returns the value of theconstructor
record component.- Returns:
- the value of the
constructor
record component
-