Record Class DropdownArgument<ENVIRONMENT extends IScratchEnvironment,TYPE>
java.lang.Object
java.lang.Record
com.petrolpark.core.scratch.argument.DropdownArgument<ENVIRONMENT,TYPE>
- All Implemented Interfaces:
IScratchArgument<ENVIRONMENT,TYPE>
public record DropdownArgument<ENVIRONMENT extends IScratchEnvironment,TYPE> (int index, DropdownArgument.DropdownParameter<ENVIRONMENT extends IScratchEnvironment,TYPE> parameter)
extends Record
implements IScratchArgument<ENVIRONMENT,TYPE>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Constructor Summary
ConstructorsConstructorDescriptionDropdownArgument(int index, DropdownArgument.DropdownParameter<ENVIRONMENT, TYPE> parameter) Creates an instance of aDropdownArgumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.get(ENVIRONMENT environment) final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.Returns the value of theparameterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DropdownArgument
Creates an instance of aDropdownArgumentrecord class.- Parameters:
index- the value for theindexrecord componentparameter- the value for theparameterrecord component
-
-
Method Details
-
get
- Specified by:
getin interfaceIScratchArgument<ENVIRONMENT extends IScratchEnvironment,TYPE>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
parameter
Returns the value of theparameterrecord component.- Specified by:
parameterin interfaceIScratchArgument<ENVIRONMENT extends IScratchEnvironment,TYPE> - Returns:
- the value of the
parameterrecord component
-