Package net.minecraft.gametest.framework
Record Class GameTestBatch
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.GameTestBatch
public record GameTestBatch(String name, Collection<GameTestInfo> gameTestInfos, Consumer<ServerLevel> beforeBatchFunction, Consumer<ServerLevel> afterBatchFunction)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Consumer<ServerLevel> The field for theafterBatchFunctionrecord component.private final Consumer<ServerLevel> The field for thebeforeBatchFunctionrecord component.static final Stringprivate final Collection<GameTestInfo> The field for thegameTestInfosrecord component.private final StringThe field for thenamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGameTestBatch(String name, Collection<GameTestInfo> gameTestInfos, Consumer<ServerLevel> beforeBatchFunction, Consumer<ServerLevel> afterBatchFunction) Creates an instance of aGameTestBatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theafterBatchFunctionrecord component.Returns the value of thebeforeBatchFunctionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegameTestInfosrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
gameTestInfos
The field for thegameTestInfosrecord component. -
beforeBatchFunction
The field for thebeforeBatchFunctionrecord component. -
afterBatchFunction
The field for theafterBatchFunctionrecord component. -
DEFAULT_BATCH_NAME
- See Also:
-
-
Constructor Details
-
GameTestBatch
public GameTestBatch(String name, Collection<GameTestInfo> gameTestInfos, Consumer<ServerLevel> beforeBatchFunction, Consumer<ServerLevel> afterBatchFunction) Creates an instance of aGameTestBatchrecord class.- Parameters:
name- the value for thenamerecord componentgameTestInfos- the value for thegameTestInfosrecord componentbeforeBatchFunction- the value for thebeforeBatchFunctionrecord componentafterBatchFunction- the value for theafterBatchFunctionrecord component
-
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
gameTestInfos
Returns the value of thegameTestInfosrecord component.- Returns:
- the value of the
gameTestInfosrecord component
-
beforeBatchFunction
Returns the value of thebeforeBatchFunctionrecord component.- Returns:
- the value of the
beforeBatchFunctionrecord component
-
afterBatchFunction
Returns the value of theafterBatchFunctionrecord component.- Returns:
- the value of the
afterBatchFunctionrecord component
-