Class AbstractTriStatePredicate<T>
- java.lang.Object
-
- net.shibboleth.utilities.java.support.logic.AbstractTriStatePredicate<T>
-
- Type Parameters:
T- the type to which the predicate is applied
public abstract class AbstractTriStatePredicate<T> extends Object implements Predicate<T>
A basePredicateimplementation which provides support for cases where the predicate can not meaningfully evaluate the input. The flags on this class allow translating these cases to a booleantrueorfalseas required by the predicate interface.
-
-
Field Summary
Fields Modifier and Type Field Description private booleannullInputSatisfiesFlag indicating whether the null input case is treated as satisfying the predicate.private booleanunevaluableSatisfiesFlag indicating whether the general unevaluable case is treated as satisfying the predicate.
-
Constructor Summary
Constructors Constructor Description AbstractTriStatePredicate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisNullInputSatisfies()Get the flag indicating whether a null input satisfies the predicate.booleanisUnevaluableSatisfies()Get the flag indicating whether a general 'unevaluable' input satisfies the predicate.voidsetNullInputSatisfies(boolean flag)Set the flag indicating whether a null input satisfies the predicate.voidsetUnevaluableSatisfies(boolean flag)Set the flag indicating whether a general 'unevaluable' input satisfies the predicate.
-
-
-
Field Detail
-
nullInputSatisfies
private boolean nullInputSatisfies
Flag indicating whether the null input case is treated as satisfying the predicate.
-
unevaluableSatisfies
private boolean unevaluableSatisfies
Flag indicating whether the general unevaluable case is treated as satisfying the predicate.
-
-
Method Detail
-
isNullInputSatisfies
public boolean isNullInputSatisfies()
Get the flag indicating whether a null input satisfies the predicate.- Returns:
- true if should satisfy, false otherwise
-
setNullInputSatisfies
public void setNullInputSatisfies(boolean flag)
Set the flag indicating whether a null input satisfies the predicate.- Parameters:
flag- true if should satisfy, false otherwise
-
isUnevaluableSatisfies
public boolean isUnevaluableSatisfies()
Get the flag indicating whether a general 'unevaluable' input satisfies the predicate.- Returns:
- true if should satisfy, false otherwise
-
setUnevaluableSatisfies
public void setUnevaluableSatisfies(boolean flag)
Set the flag indicating whether a general 'unevaluable' input satisfies the predicate.- Parameters:
flag- true if should satisfy, false otherwise
-
-