Record Class NestedProcedureArgument<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT,INSTANCE>>
java.lang.Object
java.lang.Record
com.petrolpark.core.scratch.argument.NestedProcedureArgument<ENVIRONMENT,INSTANCE>
- All Implemented Interfaces:
IScratchArgument<ENVIRONMENT,ScratchProcedure<ENVIRONMENT, INSTANCE>>
public record NestedProcedureArgument<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT,INSTANCE>> (ScratchProcedure<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT,INSTANCE>> procedure, NestedProcedureArgument.NestedProcedureParameter<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT,INSTANCE>> parameter)
extends Record
implements IScratchArgument<ENVIRONMENT,ScratchProcedure<ENVIRONMENT,INSTANCE>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNestedProcedureArgument.NestedProcedureParameter<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT, INSTANCE>> -
Constructor Summary
ConstructorsConstructorDescriptionNestedProcedureArgument(ScratchProcedure<ENVIRONMENT, INSTANCE> procedure, NestedProcedureArgument.NestedProcedureParameter<ENVIRONMENT, INSTANCE> parameter) Creates an instance of aNestedProcedureArgumentrecord 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.Returns the value of theparameterrecord component.Returns the value of theprocedurerecord component.static final <ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT, INSTANCE>>
NestedProcedureArgument.NestedProcedureParameter<ENVIRONMENT, INSTANCE> final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NestedProcedureArgument
public NestedProcedureArgument(ScratchProcedure<ENVIRONMENT, INSTANCE> procedure, NestedProcedureArgument.NestedProcedureParameter<ENVIRONMENT, INSTANCE> parameter) Creates an instance of aNestedProcedureArgumentrecord class.- Parameters:
procedure- the value for theprocedurerecord componentparameter- the value for theparameterrecord component
-
-
Method Details
-
procedure
public static final <ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT, NestedProcedureArgument.NestedProcedureParameter<ENVIRONMENT,INSTANCE>> INSTANCE> procedure(String key) -
get
- Specified by:
getin interfaceIScratchArgument<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT, INSTANCE>>
-
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). -
procedure
Returns the value of theprocedurerecord component.- Returns:
- the value of the
procedurerecord component
-
parameter
Returns the value of theparameterrecord component.- Specified by:
parameterin interfaceIScratchArgument<ENVIRONMENT extends IScratchEnvironment,INSTANCE extends NestedProcedureBlockInstance<ENVIRONMENT, INSTANCE>> - Returns:
- the value of the
parameterrecord component
-