public final class Conditions extends Object
Modifier and Type | Field and Description |
---|---|
static Condition |
FALSE
A condition which always evaluates to
false . |
static Condition |
TRUE
A condition which always evaluates to
true . |
Modifier and Type | Method and Description |
---|---|
static Condition |
and(Condition... conditions)
Creates a condition which evaluates to
true if and only if
all of its sub-conditions are true . |
static Condition |
contains(String propertyName,
String propertyStringValue)
Creates a condition which evaluates to
true if and only if a
property contains a particular value. |
static Condition |
implies(Condition premise,
Condition implication)
Creates a condition which evaluates to
false if and only if
the first sub-condition evaluates to true and the second
sub-condition evaluates to false . |
static Condition |
isPresent(String propertyName)
Creates a condition which evaluates to
true if and only if a
particular property has any values specified. |
static Condition |
not(Condition condition)
Creates a condition which evaluates to
true if the
sub-condition is false , or false if the
sub-condition is true . |
static Condition |
or(Condition... conditions)
Creates a condition which evaluates to
false if and only if
all of its sub-conditions are false . |
public static final Condition FALSE
false
.public static final Condition TRUE
true
.public static Condition and(Condition... conditions)
true
if and only if
all of its sub-conditions are true
.conditions
- The sub-conditions which be combined using a logical AND.true
if and
only if all of its sub-conditions are true
.public static Condition contains(String propertyName, String propertyStringValue)
true
if and only if a
property contains a particular value.propertyName
- The property name.propertyStringValue
- The string representation of the required property value.true
if and
only if a property contains a particular value.public static Condition implies(Condition premise, Condition implication)
false
if and only if
the first sub-condition evaluates to true
and the second
sub-condition evaluates to false
. This can be used to
represent if-then relationships.premise
- The sub-condition which, when true
implies that
the implication sub-condition must also be true
.implication
- The sub-condition which, must be true
when the
premise is true
.false
if and
only if the first sub-condition evaluates to true
and the second sub-condition evaluates to false
.public static Condition isPresent(String propertyName)
true
if and only if a
particular property has any values specified.propertyName
- The property name.true
if and
only if a particular property has any values specified.public static Condition not(Condition condition)
true
if the
sub-condition is false
, or false
if the
sub-condition is true
.condition
- The sub-condition which will be inverted.true
if the
sub-condition is false
, or false
if the
sub-condition is true
.public static Condition or(Condition... conditions)
false
if and only if
all of its sub-conditions are false
.conditions
- The sub-conditions which be combined using a logical OR.false
if and
only if all of its sub-conditions are false
.Copyright 2010-2020 ForgeRock AS.