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
All Implemented Interfaces:
Predicate<T>, Predicate<T>

public abstract class AbstractTriStatePredicate<T>
extends Object
implements 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 Details

    • 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.
  • 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