Package org.forgerock.opendj.ldap
Enum Class ConditionResult
- All Implemented Interfaces:
Serializable
,Comparable<ConditionResult>
,java.lang.constant.Constable
The result of a tri-state logical expression. Condition results are used to
represent the result of a conditional evaluation that can yield three
possible values:
FALSE
(i.e. "no"), TRUE
(i.e. "yes"), or
UNDEFINED
(i.e. "maybe"). A result of UNDEFINED
indicates
that further investigation may be required.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConditionResult
and()
Returns the logical AND of zero condition results, which is alwaysTRUE
.Returns the logical AND of the this condition result with the provided condition result, which isTRUE
if both of the condition results areTRUE
,FALSE
if at least one of them isFALSE
, andUNDEFINED
otherwise.static ConditionResult
and
(ConditionResult... results) Returns the logical AND of the provided condition results, which isTRUE
if all of the provided condition results areTRUE
,FALSE
if at least one of them isFALSE
, andUNDEFINED
otherwise.static ConditionResult
and
(ConditionResult r1, ConditionResult r2) Returns the logical AND of the provided condition results, which isTRUE
if both of the provided condition results areTRUE
,FALSE
if at least one of them isFALSE
, andUNDEFINED
otherwise.not()
Returns the logical NOT of this condition result, which isTRUE
if this condition result isFALSE
,TRUE
if it isFALSE
, andUNDEFINED
otherwise.static ConditionResult
Returns the logical NOT of the provided condition result, which isTRUE
if the provided condition result isFALSE
,TRUE
if it isFALSE
, andUNDEFINED
otherwise.static ConditionResult
or()
Returns the logical OR of zero condition results, which is alwaysFALSE
.Returns the logical OR of the this condition result with the provided condition result, which isFALSE
if both of the condition results areFALSE
,TRUE
if at least one of them isTRUE
, andUNDEFINED
otherwise.static ConditionResult
or
(ConditionResult... results) Returns the logical OR of the provided condition results, which isFALSE
if all of the provided condition results areFALSE
,TRUE
if at least one of them isTRUE
, andUNDEFINED
otherwise.static ConditionResult
or
(ConditionResult r1, ConditionResult r2) Returns the logical OR of the provided condition results, which isFALSE
if both of the provided condition results areFALSE
,TRUE
if at least one of them isTRUE
, andUNDEFINED
otherwise.boolean
Converts this condition result to a boolean value.toString()
Returns the string representation of this condition result.static ConditionResult
valueOf
(boolean b) Returns the condition result which is equivalent to the provided boolean value.static ConditionResult
Returns the enum constant of this class with the specified name.static ConditionResult[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FALSE
Indicates that the condition evaluated tofalse
. -
UNDEFINED
Indicates that the condition could not be evaluated and its result is undefined. -
TRUE
Indicates that the condition evaluated totrue
.
-
-
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
-
and
Returns the logical AND of zero condition results, which is alwaysTRUE
.- Returns:
- The logical OR of zero condition results, which is always
TRUE
.
-
and
Returns the logical AND of the provided condition results, which isTRUE
if all of the provided condition results areTRUE
,FALSE
if at least one of them isFALSE
, andUNDEFINED
otherwise. Note thatTRUE
is returned if the provided list of results is empty.- Parameters:
results
- The condition results to be compared.- Returns:
- The logical AND of the provided condition results.
-
and
Returns the logical AND of the provided condition results, which isTRUE
if both of the provided condition results areTRUE
,FALSE
if at least one of them isFALSE
, andUNDEFINED
otherwise.- Parameters:
r1
- The first condition result to be compared.r2
- The second condition result to be compared.- Returns:
- The logical AND of the provided condition results.
-
and
Returns the logical AND of the this condition result with the provided condition result, which isTRUE
if both of the condition results areTRUE
,FALSE
if at least one of them isFALSE
, andUNDEFINED
otherwise.- Parameters:
r
- The condition result to be compared with this one.- Returns:
- The logical AND of the two condition results.
-
not
Returns the logical NOT of the provided condition result, which isTRUE
if the provided condition result isFALSE
,TRUE
if it isFALSE
, andUNDEFINED
otherwise.- Parameters:
r
- The condition result to invert.- Returns:
- The logical NOT of the provided condition result.
-
not
Returns the logical NOT of this condition result, which isTRUE
if this condition result isFALSE
,TRUE
if it isFALSE
, andUNDEFINED
otherwise.- Returns:
- The logical NOT of this condition result.
-
or
Returns the logical OR of zero condition results, which is alwaysFALSE
.- Returns:
- The logical OR of zero condition results, which is always
FALSE
.
-
or
Returns the logical OR of the provided condition results, which isFALSE
if all of the provided condition results areFALSE
,TRUE
if at least one of them isTRUE
, andUNDEFINED
otherwise. Note thatFALSE
is returned if the provided list of results is empty.- Parameters:
results
- The condition results to be compared.- Returns:
- The logical OR of the provided condition results.
-
or
Returns the logical OR of the provided condition results, which isFALSE
if both of the provided condition results areFALSE
,TRUE
if at least one of them isTRUE
, andUNDEFINED
otherwise.- Parameters:
r1
- The first condition result to be compared.r2
- The second condition result to be compared.- Returns:
- The logical OR of the provided condition results.
-
or
Returns the logical OR of the this condition result with the provided condition result, which isFALSE
if both of the condition results areFALSE
,TRUE
if at least one of them isTRUE
, andUNDEFINED
otherwise.- Parameters:
r
- The condition result to be compared with this one.- Returns:
- The logical OR of the two condition results.
-
valueOf
Returns the condition result which is equivalent to the provided boolean value.- Parameters:
b
- The boolean value.- Returns:
TRUE
ifb
wastrue
, otherwiseFALSE
.
-
toBoolean
public boolean toBoolean()Converts this condition result to a boolean value.FALSE
andUNDEFINED
are both converted tofalse
, andTRUE
is converted totrue
.- Returns:
- The boolean equivalent of this condition result.
-
toString
Returns the string representation of this condition result.- Overrides:
toString
in classEnum<ConditionResult>
- Returns:
- The string representation of his condition result.
-