Package net.shibboleth.shared.logic
Class AbstractTriStatePredicate<T>
java.lang.Object
net.shibboleth.shared.logic.AbstractTriStatePredicate<T>
- Type Parameters:
T- the type to which the predicate is applied
- All Implemented Interfaces:
Predicate<T>
A base
Predicate implementation 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 boolean true or false
as required by the predicate interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag indicating whether the null input case is treated as satisfying the predicate.private booleanFlag indicating whether the general unevaluable case is treated as satisfying the predicate. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the flag indicating whether a null input satisfies the predicate.booleanGet 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 Details
-
nullInputSatisfies
private boolean nullInputSatisfiesFlag indicating whether the null input case is treated as satisfying the predicate. -
unevaluableSatisfies
private boolean unevaluableSatisfiesFlag indicating whether the general unevaluable case is treated as satisfying the predicate.
-
-
Constructor Details
-
AbstractTriStatePredicate
public AbstractTriStatePredicate()
-
-
Method Details
-
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
-