Enum Class EnumEvalResult
- All Implemented Interfaces:
Serializable
,Comparable<EnumEvalResult>
,java.lang.constant.Constable
This class provides an enumeration of evaluation results returned by the bind rule evaluation methods.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis is an internal enumeration used during evaluation of bind rule when internal processing of the evaluation is undefined.This enumeration is returned when the result of the evaluation is FAIL.This enumeration is returned when the result of the evaluation is FALSE.This enumeration is returned when the result of the evaluation is TRUE. -
Method Summary
Modifier and TypeMethodDescriptionThe method tries to determine if the result was undefined, and if so it returns an FAIL enumeration.negateIfNeeded
(boolean negate) This method is used to possibly negate the result of a simple bind rule evaluation.static EnumEvalResult
valueOf
(boolean b) Returns the EnumEvalResult corresponding to the provided boolean.static EnumEvalResult
Returns the enum constant of this class with the specified name.static EnumEvalResult[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRUE
This enumeration is returned when the result of the evaluation is TRUE. -
FALSE
This enumeration is returned when the result of the evaluation is FALSE. -
FAIL
This enumeration is returned when the result of the evaluation is FAIL. This should only be returned when a system failure occurred. -
ERR
This is an internal enumeration used during evaluation of bind rule when internal processing of the evaluation is undefined. It is never returned back as a result of the evaluation.
-
-
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
-
getRet
The method tries to determine if the result was undefined, and if so it returns an FAIL enumeration. If the result was not undefined (the common case for all of the bind rule evaluations), then the bind rule type is examined to see if the result needs to be flipped (type equals NOT_EQUAL_BINDRULE_TYPE).- Parameters:
type
- The bind rule type enumeration of the bind rule.- Returns:
- An enumeration containing the correct result after processing the undefined field and the bind rule type enumeration.
-
negateIfNeeded
This method is used to possibly negate the result of a simple bind rule evaluation. If the boolean is true than the result is negated.- Parameters:
negate
- If true the result should be negated (true->false, false->true
).- Returns:
- A possibly negated enumeration result.
-
valueOf
Returns the EnumEvalResult corresponding to the provided boolean.- Parameters:
b
- the bolean to evaluate- Returns:
- the EnumEvalResult corresponding to the provided boolean
-