Package org.forgerock.opendj.ldap
Enum ConditionResult
- java.lang.Object
-
- java.lang.Enum<ConditionResult>
-
- org.forgerock.opendj.ldap.ConditionResult
-
- All Implemented Interfaces:
Serializable,Comparable<ConditionResult>
public enum ConditionResult extends Enum<ConditionResult>
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"), orUNDEFINED(i.e. "maybe"). A result ofUNDEFINEDindicates that further investigation may be required.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConditionResultand()Returns the logical AND of zero condition results, which is alwaysTRUE.ConditionResultand(ConditionResult r)Returns the logical AND of the this condition result with the provided condition result, which isTRUEif both of the condition results areTRUE,FALSEif at least one of them isFALSE, andUNDEFINEDotherwise.static ConditionResultand(ConditionResult... results)Returns the logical AND of the provided condition results, which isTRUEif all of the provided condition results areTRUE,FALSEif at least one of them isFALSE, andUNDEFINEDotherwise.static ConditionResultand(ConditionResult r1, ConditionResult r2)Returns the logical AND of the provided condition results, which isTRUEif both of the provided condition results areTRUE,FALSEif at least one of them isFALSE, andUNDEFINEDotherwise.ConditionResultnot()Returns the logical NOT of this condition result, which isTRUEif this condition result isFALSE,TRUEif it isFALSE, andUNDEFINEDotherwise.static ConditionResultnot(ConditionResult r)Returns the logical NOT of the provided condition result, which isTRUEif the provided condition result isFALSE,TRUEif it isFALSE, andUNDEFINEDotherwise.static ConditionResultor()Returns the logical OR of zero condition results, which is alwaysFALSE.ConditionResultor(ConditionResult r)Returns the logical OR of the this condition result with the provided condition result, which isFALSEif both of the condition results areFALSE,TRUEif at least one of them isTRUE, andUNDEFINEDotherwise.static ConditionResultor(ConditionResult... results)Returns the logical OR of the provided condition results, which isFALSEif all of the provided condition results areFALSE,TRUEif at least one of them isTRUE, andUNDEFINEDotherwise.static ConditionResultor(ConditionResult r1, ConditionResult r2)Returns the logical OR of the provided condition results, which isFALSEif both of the provided condition results areFALSE,TRUEif at least one of them isTRUE, andUNDEFINEDotherwise.booleantoBoolean()Converts this condition result to a boolean value.StringtoString()Returns the string representation of this condition result.static ConditionResultvalueOf(boolean b)Returns the condition result which is equivalent to the provided boolean value.static ConditionResultvalueOf(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.
-
-
-
Enum Constant Detail
-
FALSE
public static final ConditionResult FALSE
Indicates that the condition evaluated tofalse.
-
UNDEFINED
public static final ConditionResult UNDEFINED
Indicates that the condition could not be evaluated and its result is undefined.
-
TRUE
public static final ConditionResult TRUE
Indicates that the condition evaluated totrue.
-
-
Method Detail
-
values
public static ConditionResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConditionResult c : ConditionResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConditionResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
and
public static ConditionResult 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
public static ConditionResult and(ConditionResult... results)
Returns the logical AND of the provided condition results, which isTRUEif all of the provided condition results areTRUE,FALSEif at least one of them isFALSE, andUNDEFINEDotherwise. Note thatTRUEis 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
public static ConditionResult and(ConditionResult r1, ConditionResult r2)
Returns the logical AND of the provided condition results, which isTRUEif both of the provided condition results areTRUE,FALSEif at least one of them isFALSE, andUNDEFINEDotherwise.- 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
public ConditionResult and(ConditionResult r)
Returns the logical AND of the this condition result with the provided condition result, which isTRUEif both of the condition results areTRUE,FALSEif at least one of them isFALSE, andUNDEFINEDotherwise.- Parameters:
r- The condition result to be compared with this one.- Returns:
- The logical AND of the two condition results.
-
not
public static ConditionResult not(ConditionResult r)
Returns the logical NOT of the provided condition result, which isTRUEif the provided condition result isFALSE,TRUEif it isFALSE, andUNDEFINEDotherwise.- Parameters:
r- The condition result to invert.- Returns:
- The logical NOT of the provided condition result.
-
not
public ConditionResult not()
Returns the logical NOT of this condition result, which isTRUEif this condition result isFALSE,TRUEif it isFALSE, andUNDEFINEDotherwise.- Returns:
- The logical NOT of this condition result.
-
or
public static ConditionResult 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
public static ConditionResult or(ConditionResult... results)
Returns the logical OR of the provided condition results, which isFALSEif all of the provided condition results areFALSE,TRUEif at least one of them isTRUE, andUNDEFINEDotherwise. Note thatFALSEis 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
public static ConditionResult or(ConditionResult r1, ConditionResult r2)
Returns the logical OR of the provided condition results, which isFALSEif both of the provided condition results areFALSE,TRUEif at least one of them isTRUE, andUNDEFINEDotherwise.- 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
public ConditionResult or(ConditionResult r)
Returns the logical OR of the this condition result with the provided condition result, which isFALSEif both of the condition results areFALSE,TRUEif at least one of them isTRUE, andUNDEFINEDotherwise.- Parameters:
r- The condition result to be compared with this one.- Returns:
- The logical OR of the two condition results.
-
valueOf
public static ConditionResult valueOf(boolean b)
Returns the condition result which is equivalent to the provided boolean value.- Parameters:
b- The boolean value.- Returns:
TRUEifbwastrue, otherwiseFALSE.
-
toBoolean
public boolean toBoolean()
Converts this condition result to a boolean value.FALSEandUNDEFINEDare both converted tofalse, andTRUEis converted totrue.- Returns:
- The boolean equivalent of this condition result.
-
toString
public String toString()
Returns the string representation of this condition result.- Overrides:
toStringin classEnum<ConditionResult>- Returns:
- The string representation of his condition result.
-
-