Contents
Enum Class LogicCondition.Operator
java.lang.Object
java.lang.Enum<LogicCondition.Operator>
com.hypixel.hytale.server.core.modules.entity.condition.LogicCondition.Operator
- All Implemented Interfaces:
Serializable, Comparable<LogicCondition.Operator>, Constable
- Enclosing class:
LogicCondition
The logical operators for combining conditions.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract booleaneval(ComponentAccessor<EntityStore> store, Ref<EntityStore> ref, Instant currentTime, Condition[] conditions) Evaluates the logical operation on the given conditions.static LogicCondition.OperatorReturns the enum constant of this class with the specified name.static LogicCondition.Operator[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
AND
An AND operator that requires all conditions to be true.If any of the conditions is false, the entire evaluation fails.
-
OR
An OR operator that requires at least one condition to be true.If any of the conditions is true, the entire evaluation succeeds.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
eval
public abstract boolean eval(@Nonnull ComponentAccessor<EntityStore> store, @Nonnull Ref<EntityStore> ref, @Nonnull Instant currentTime, @Nonnull Condition[] conditions) Evaluates the logical operation on the given conditions.- Parameters:
store- TheComponentAccessor<EntityStore>for store access.ref- The entity reference of the entity.currentTime- The current world time.conditions- The array ofConditioninstances to evaluate.- Returns:
trueif the logical operation evaluates to true,falseotherwise.
-