public enum ConditionResult extends Enum<ConditionResult>
FALSE (i.e. "no"), TRUE (i.e. "yes"), or
UNDEFINED (i.e. "maybe"). A result of UNDEFINED indicates
that further investigation may be required.| Enum Constant and Description |
|---|
FALSE
Indicates that the condition evaluated to
false. |
TRUE
Indicates that the condition evaluated to
true. |
UNDEFINED
Indicates that the condition could not be evaluated and its result is
undefined.
|
| Modifier and Type | Method and Description |
|---|---|
static ConditionResult |
and()
Returns the logical AND of zero condition results, which is always
TRUE. |
static ConditionResult |
and(ConditionResult... results)
Returns the logical AND of the provided condition results, which is
TRUE if all of the provided condition results are TRUE,
FALSE if at least one of them is FALSE, and
UNDEFINED otherwise. |
static ConditionResult |
and(ConditionResult r)
Returns the logical AND of the provided condition result, which is always
r. |
static ConditionResult |
and(ConditionResult r1,
ConditionResult r2)
Returns the logical AND of the provided condition results, which is
TRUE if both of the provided condition results are TRUE,
FALSE if at least one of them is FALSE , and
UNDEFINED otherwise. |
static ConditionResult |
not(ConditionResult r)
Returns the logical NOT of the provided condition result, which is
TRUE if the provided condition result is FALSE,
TRUE if it is FALSE, and UNDEFINED otherwise. |
static ConditionResult |
or()
Returns the logical OR of zero condition results, which is always
FALSE. |
static ConditionResult |
or(ConditionResult... results)
Returns the logical OR of the provided condition results, which is
FALSE if all of the provided condition results are FALSE,
TRUE if at least one of them is TRUE, and
UNDEFINED otherwise. |
static ConditionResult |
or(ConditionResult r)
Returns the logical OR of the provided condition result, which is always
r. |
static ConditionResult |
or(ConditionResult r1,
ConditionResult r2)
Returns the logical OR of the provided condition results, which is
FALSE if both of the provided condition results are FALSE
, TRUE if at least one of them is TRUE , and
UNDEFINED otherwise. |
boolean |
toBoolean()
Converts this condition result to a boolean value.
|
String |
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 |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConditionResult[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConditionResult FALSE
false.public static final ConditionResult UNDEFINED
public static final ConditionResult TRUE
true.public static ConditionResult[] values()
for (ConditionResult c : ConditionResult.values()) System.out.println(c);
public static ConditionResult valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static ConditionResult and()
TRUE.TRUE.public static ConditionResult and(ConditionResult r)
r.r - The condition result.r.public static ConditionResult and(ConditionResult... results)
TRUE if all of the provided condition results are TRUE,
FALSE if at least one of them is FALSE, and
UNDEFINED otherwise. Note that TRUE is returned if the
provided list of results is empty.results - The condition results to be compared.public static ConditionResult and(ConditionResult r1, ConditionResult r2)
TRUE if both of the provided condition results are TRUE,
FALSE if at least one of them is FALSE , and
UNDEFINED otherwise.r1 - The first condition result to be compared.r2 - The second condition result to be compared.public static ConditionResult not(ConditionResult r)
TRUE if the provided condition result is FALSE,
TRUE if it is FALSE, and UNDEFINED otherwise.r - The condition result to invert.public static ConditionResult or()
FALSE.FALSE.public static ConditionResult or(ConditionResult r)
r.r - The condition result.r.public static ConditionResult or(ConditionResult... results)
FALSE if all of the provided condition results are FALSE,
TRUE if at least one of them is TRUE, and
UNDEFINED otherwise. Note that FALSE is returned if the
provided list of results is empty.results - The condition results to be compared.public static ConditionResult or(ConditionResult r1, ConditionResult r2)
FALSE if both of the provided condition results are FALSE
, TRUE if at least one of them is TRUE , and
UNDEFINED otherwise.r1 - The first condition result to be compared.r2 - The second condition result to be compared.public static ConditionResult valueOf(boolean b)
b - The boolean value.TRUE if b was true, otherwise
FALSE .public boolean toBoolean()
FALSE and
UNDEFINED are both converted to false, and TRUE
is converted to true.public String toString()
toString in class Enum<ConditionResult>Copyright © 2011-2015 ForgeRock AS. All Rights Reserved.