Record Class Scores.ScoreCondition
java.lang.Object
java.lang.Record
cn.nukkit.command.selector.args.impl.Scores.ScoreCondition
- Enclosing class:
- Scores
-
Constructor Summary
ModifierConstructorDescriptionprotected
ScoreCondition
(String objectiveName, int min, int max, boolean reversed) Creates an instance of aScoreCondition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
max()
Returns the value of themax
record component.int
min()
Returns the value of themin
record component.Returns the value of theobjectiveName
record component.boolean
reversed()
Returns the value of thereversed
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ScoreCondition
Creates an instance of aScoreCondition
record class.- Parameters:
objectiveName
- the value for theobjectiveName
record componentmin
- the value for themin
record componentmax
- the value for themax
record componentreversed
- the value for thereversed
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
objectiveName
Returns the value of theobjectiveName
record component.- Returns:
- the value of the
objectiveName
record component
-
min
public int min()Returns the value of themin
record component.- Returns:
- the value of the
min
record component
-
max
public int max()Returns the value of themax
record component.- Returns:
- the value of the
max
record component
-
reversed
public boolean reversed()Returns the value of thereversed
record component.- Returns:
- the value of the
reversed
record component
-