Package net.minecraft.gametest.framework
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 p_320828_, int p_320137_) 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 p_320828_, int p_320137_) -
hasRetries
public boolean hasRetries() -
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 with '=='. -
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
-