Record Class RetryOptions
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.RetryOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thehaltOnFailurerecord component.private static final RetryOptionsprivate final intThe field for thenumberOfTriesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRetryOptions(int numberOfTries, boolean haltOnFailure) Creates an instance of aRetryOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehaltOnFailurerecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanhasTriesLeft(int attempts, int successes) static RetryOptionsintReturns the value of thenumberOfTriesrecord component.final StringtoString()Returns a string representation of this record class.boolean
-
Field Details
-
numberOfTries
private final int numberOfTriesThe field for thenumberOfTriesrecord component. -
haltOnFailure
private final boolean haltOnFailureThe field for thehaltOnFailurerecord component. -
NO_RETRIES
-
-
Constructor Details
-
RetryOptions
public RetryOptions(int numberOfTries, boolean haltOnFailure) Creates an instance of aRetryOptionsrecord class.- Parameters:
numberOfTries- the value for thenumberOfTriesrecord componenthaltOnFailure- the value for thehaltOnFailurerecord component
-
-
Method Details
-
noRetries
-
unlimitedTries
public boolean unlimitedTries() -
hasTriesLeft
public boolean hasTriesLeft(int attempts, int successes) -
hasRetries
public boolean hasRetries() -
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
numberOfTries
public int numberOfTries()Returns the value of thenumberOfTriesrecord component.- Returns:
- the value of the
numberOfTriesrecord component
-
haltOnFailure
public boolean haltOnFailure()Returns the value of thehaltOnFailurerecord component.- Returns:
- the value of the
haltOnFailurerecord component
-