Class ArenaConditionVariableValue<T>
java.lang.Object
de.marcely.bedwars.api.arena.picker.condition.variable.ArenaConditionVariableValue<T>
- Type Parameters:
T- The actual value that it is holding. E.g.StringforArenaConditionVariableValueString
- Direct Known Subclasses:
ArenaConditionVariableValueNumber,ArenaConditionVariableValueString
Represents a value that may be used to compare.
It may be manually constructed by using either its inheritances or ArenaConditionVariable.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(ArenaConditionComparisonOperator operator, ArenaConditionVariableValue<?> secondValue) Automatically executes the correct operation method given the passed operator.abstract booleanDoes aArenaConditionComparisonOperator.EQUALoperation.getEntry()Returns the actual data that this wrapper is holding.abstract bytegetType()The type of this class.abstract booleangreaterThan(T entry) Does aArenaConditionComparisonOperator.GREATER_THANoperation.abstract booleangreaterThanOrEqual(T entry) Does aArenaConditionComparisonOperator.GREATER_THAN_OR_EQUALoperation.abstract booleanDoes aArenaConditionComparisonOperator.LESS_THANoperation.abstract booleanlessThanOrEqual(T entry) Does aArenaConditionComparisonOperator.LESS_THAN_OR_EQUALoperation.abstract booleanDoes aArenaConditionComparisonOperator.NOT_EQUALoperation.abstract booleanDoes aArenaConditionComparisonOperator.SIMILARoperation.
-
Field Details
-
TYPE_NUMBER
public static final byte TYPE_NUMBER- See Also:
-
TYPE_STRING
public static final byte TYPE_STRING- See Also:
-
entry
-
-
Constructor Details
-
ArenaConditionVariableValue
-
-
Method Details
-
getEntry
Returns the actual data that this wrapper is holding.- Returns:
- The data that this instance represents
-
getType
public abstract byte getType()The type of this class.You may find them as fields within this class, e.g.
TYPE_NUMBER.- Returns:
- The type of this equal
-
equal
Does aArenaConditionComparisonOperator.EQUALoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
similar
Does aArenaConditionComparisonOperator.SIMILARoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
notEqual
Does aArenaConditionComparisonOperator.NOT_EQUALoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
greaterThan
Does aArenaConditionComparisonOperator.GREATER_THANoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
lessThan
Does aArenaConditionComparisonOperator.LESS_THANoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
greaterThanOrEqual
Does aArenaConditionComparisonOperator.GREATER_THAN_OR_EQUALoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
lessThanOrEqual
Does aArenaConditionComparisonOperator.LESS_THAN_OR_EQUALoperation.- Parameters:
entry- The second value of the same type- Returns:
truein case the operation succeded
-
check
public boolean check(ArenaConditionComparisonOperator operator, ArenaConditionVariableValue<?> secondValue) Automatically executes the correct operation method given the passed operator.Additionally does an unsafe casting from a generic value object.
- Parameters:
operator- The operation that shall be donesecondValue- The second value- Returns:
truein case the operation succeded
-