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
Modifier and TypeFieldDescriptionprivate final Consumer
<ServerLevel> The field for theafterBatchFunction
record component.private final Consumer
<ServerLevel> The field for thebeforeBatchFunction
record component.static final String
private final Collection
<GameTestInfo> The field for thegameTestInfos
record component.private final String
The field for thename
record component. -
Constructor Summary
ConstructorDescriptionGameTestBatch
(String name, Collection<GameTestInfo> gameTestInfos, Consumer<ServerLevel> beforeBatchFunction, Consumer<ServerLevel> afterBatchFunction) Creates an instance of aGameTestBatch
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theafterBatchFunction
record component.Returns the value of thebeforeBatchFunction
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegameTestInfos
record component.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
name
The field for thename
record component. -
gameTestInfos
The field for thegameTestInfos
record component. -
beforeBatchFunction
The field for thebeforeBatchFunction
record component. -
afterBatchFunction
The field for theafterBatchFunction
record 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 aGameTestBatch
record class.- Parameters:
name
- the value for thename
record componentgameTestInfos
- the value for thegameTestInfos
record componentbeforeBatchFunction
- the value for thebeforeBatchFunction
record componentafterBatchFunction
- the value for theafterBatchFunction
record 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 thename
record component.- Returns:
- the value of the
name
record component
-
gameTestInfos
Returns the value of thegameTestInfos
record component.- Returns:
- the value of the
gameTestInfos
record component
-
beforeBatchFunction
Returns the value of thebeforeBatchFunction
record component.- Returns:
- the value of the
beforeBatchFunction
record component
-
afterBatchFunction
Returns the value of theafterBatchFunction
record component.- Returns:
- the value of the
afterBatchFunction
record component
-