Record Class ScratchProcedure.Line<ENVIRONMENT extends IScratchEnvironment,ARGUMENTS extends ScratchArguments<? super ENVIRONMENT,?>>
java.lang.Object
java.lang.Record
com.petrolpark.core.scratch.procedure.ScratchProcedure.Line<ENVIRONMENT,ARGUMENTS>
- Enclosing class:
ScratchProcedure<ENVIRONMENT extends IScratchEnvironment,CONTEXT extends IScratchContext<CONTEXT>>
public static record ScratchProcedure.Line<ENVIRONMENT extends IScratchEnvironment,ARGUMENTS extends ScratchArguments<? super ENVIRONMENT,?>> (IScratchBlock<? super ENVIRONMENT extends IScratchEnvironment,ARGUMENTS extends ScratchArguments<? super ENVIRONMENT,?>,?> block, ARGUMENTS extends ScratchArguments<? super ENVIRONMENT,?> arguments)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionLine(IScratchBlock<? super ENVIRONMENT, ARGUMENTS, ?> block, ARGUMENTS arguments) Creates an instance of aLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.IScratchBlock<? super ENVIRONMENT, ARGUMENTS, ?> block()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.run(ENVIRONMENT environment) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Line
Creates an instance of aLinerecord class.- Parameters:
block- the value for theblockrecord componentarguments- the value for theargumentsrecord component
-
-
Method Details
-
run
-
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). -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-