Package net.minecraft.gametest.framework
Record Class RetryOptions
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.RetryOptions
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
The field for thehaltOnFailure
record component.private static final RetryOptions
private final int
The field for thenumberOfTries
record component. -
Constructor Summary
ConstructorDescriptionRetryOptions
(int numberOfTries, boolean haltOnFailure) Creates an instance of aRetryOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thehaltOnFailure
record component.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
hasTriesLeft
(int p_320828_, int p_320137_) static RetryOptions
int
Returns the value of thenumberOfTries
record component.final String
toString()
Returns a string representation of this record class.boolean
-
Field Details
-
numberOfTries
private final int numberOfTriesThe field for thenumberOfTries
record component. -
haltOnFailure
private final boolean haltOnFailureThe field for thehaltOnFailure
record component. -
NO_RETRIES
-
-
Constructor Details
-
RetryOptions
public RetryOptions(int numberOfTries, boolean haltOnFailure) Creates an instance of aRetryOptions
record class.- Parameters:
numberOfTries
- the value for thenumberOfTries
record componenthaltOnFailure
- the value for thehaltOnFailure
record 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 thenumberOfTries
record component.- Returns:
- the value of the
numberOfTries
record component
-
haltOnFailure
public boolean haltOnFailure()Returns the value of thehaltOnFailure
record component.- Returns:
- the value of the
haltOnFailure
record component
-