Package megamek.client.ui.util.verifier
Record Class VerifyInRange
java.lang.Object
java.lang.Record
megamek.client.ui.util.verifier.VerifyInRange
- All Implemented Interfaces:
DataVerifier
public record VerifyInRange(double min, double max, boolean mustBeInteger)
extends Record
implements DataVerifier
- Since:
- 3/18/14 1:14 PM
-
Constructor Summary
ConstructorsConstructorDescriptionVerifyInRange(double min, double max, boolean mustBeInteger) Creates an instance of aVerifyInRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemax()Returns the value of themaxrecord component.doublemin()Returns the value of theminrecord component.booleanReturns the value of themustBeIntegerrecord component.final StringtoString()Returns a string representation of this record class.Performs a verification of the given value.
-
Constructor Details
-
VerifyInRange
public VerifyInRange(double min, double max, boolean mustBeInteger) Creates an instance of aVerifyInRangerecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord componentmustBeInteger- the value for themustBeIntegerrecord component
-
-
Method Details
-
verify
Description copied from interface:DataVerifierPerforms a verification of the given value. If the value is good, a null is returned. Otherwise, aStringexplaining how the verification failed will be returned.- Specified by:
verifyin interfaceDataVerifier- Parameters:
value- The value to be evaluated.- Returns:
- NULL if the value is good, otherwise a description of how the evaluation failed.
-
verify
-
verify
-
verify
-
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 '=='. -
min
public double min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public double max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
mustBeInteger
public boolean mustBeInteger()Returns the value of themustBeIntegerrecord component.- Returns:
- the value of the
mustBeIntegerrecord component
-