Record Class MultipleOptionsArgument.OptionContainer<TValue>
java.lang.Object
java.lang.Record
com.minecolonies.core.commands.arguments.MultipleOptionsArgument.OptionContainer<TValue>
- Type Parameters:
TValue- the generic type of the option parser.- Record Components:
option- the chosen option in the parser.value- the original input value originating from the parser.
- Enclosing class:
- MultipleOptionsArgument<TValue>
public static record MultipleOptionsArgument.OptionContainer<TValue>(MultipleOptionsArgument.ArgumentOption<TValue> option, String value)
extends Record
Container class carrying the chosen option + original input value to the resolver method.
-
Constructor Summary
ConstructorsConstructorDescriptionOptionContainer(MultipleOptionsArgument.ArgumentOption<TValue> option, String value) Creates an instance of aOptionContainerrecord 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.option()Returns the value of theoptionrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
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). -
option
Returns the value of theoptionrecord component.- Returns:
- the value of the
optionrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-