Record Class GameTestData

java.lang.Object
java.lang.Record
net.neoforged.testframework.gametest.GameTestData

@ParametersAreNonnullByDefault public record GameTestData(@Nullable String batchName, String structureName, boolean required, int maxAttempts, int requiredSuccesses, Consumer<GameTestHelper> function, int maxTicks, long setupTicks, Rotation rotation) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The field for the batchName record component.
    private final Consumer<GameTestHelper>
    The field for the function record component.
    private final int
    The field for the maxAttempts record component.
    private final int
    The field for the maxTicks record component.
    private final boolean
    The field for the required record component.
    private final int
    The field for the requiredSuccesses record component.
    private final Rotation
    The field for the rotation record component.
    private final long
    The field for the setupTicks record component.
    private final String
    The field for the structureName record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GameTestData(String batchName, String structureName, boolean required, int maxAttempts, int requiredSuccesses, Consumer<GameTestHelper> function, int maxTicks, long setupTicks, Rotation rotation)
    Creates an instance of a GameTestData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the batchName record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the function record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxAttempts record component.
    int
    Returns the value of the maxTicks record component.
    boolean
    Returns the value of the required record component.
    int
    Returns the value of the requiredSuccesses record component.
    Returns the value of the rotation record component.
    long
    Returns the value of the setupTicks record component.
    Returns the value of the structureName record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • batchName

      @Nullable private final String batchName
      The field for the batchName record component.
    • structureName

      private final String structureName
      The field for the structureName record component.
    • required

      private final boolean required
      The field for the required record component.
    • maxAttempts

      private final int maxAttempts
      The field for the maxAttempts record component.
    • requiredSuccesses

      private final int requiredSuccesses
      The field for the requiredSuccesses record component.
    • function

      private final Consumer<GameTestHelper> function
      The field for the function record component.
    • maxTicks

      private final int maxTicks
      The field for the maxTicks record component.
    • setupTicks

      private final long setupTicks
      The field for the setupTicks record component.
    • rotation

      private final Rotation rotation
      The field for the rotation record component.
  • Constructor Details

    • GameTestData

      public GameTestData(@Nullable String batchName, String structureName, boolean required, int maxAttempts, int requiredSuccesses, Consumer<GameTestHelper> function, int maxTicks, long setupTicks, Rotation rotation)
      Creates an instance of a GameTestData record class.
      Parameters:
      batchName - the value for the batchName record component
      structureName - the value for the structureName record component
      required - the value for the required record component
      maxAttempts - the value for the maxAttempts record component
      requiredSuccesses - the value for the requiredSuccesses record component
      function - the value for the function record component
      maxTicks - the value for the maxTicks record component
      setupTicks - the value for the setupTicks record component
      rotation - the value for the rotation record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • batchName

      @Nullable public String batchName()
      Returns the value of the batchName record component.
      Returns:
      the value of the batchName record component
    • structureName

      public String structureName()
      Returns the value of the structureName record component.
      Returns:
      the value of the structureName record component
    • required

      public boolean required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component
    • maxAttempts

      public int maxAttempts()
      Returns the value of the maxAttempts record component.
      Returns:
      the value of the maxAttempts record component
    • requiredSuccesses

      public int requiredSuccesses()
      Returns the value of the requiredSuccesses record component.
      Returns:
      the value of the requiredSuccesses record component
    • function

      public Consumer<GameTestHelper> function()
      Returns the value of the function record component.
      Returns:
      the value of the function record component
    • maxTicks

      public int maxTicks()
      Returns the value of the maxTicks record component.
      Returns:
      the value of the maxTicks record component
    • setupTicks

      public long setupTicks()
      Returns the value of the setupTicks record component.
      Returns:
      the value of the setupTicks record component
    • rotation

      public Rotation rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component