Class AnyOf<T>

  • All Implemented Interfaces:
    Predicate<T>

    public final class AnyOf<T>
    extends java.lang.Object
    implements Predicate<T>
    A Predicate which is satisfied if any of a given number of predicates are satisfied. This is equivalent to the boolean "OR" operation.
    • Constructor Summary

      Constructors 
      Constructor Description
      AnyOf​(java.lang.Iterable<? extends Predicate<? super T>> delegates)  
      AnyOf​(Predicate<? super T>... delegates)  
      AnyOf​(T... delegates)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean satisfiedBy​(T testedInstance)
      Returns whether the given instance satisfies this predicate.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnyOf

        @SafeVarargs
        public AnyOf​(T... delegates)
      • AnyOf

        @SafeVarargs
        public AnyOf​(Predicate<? super T>... delegates)
      • AnyOf

        public AnyOf​(java.lang.Iterable<? extends Predicate<? super T>> delegates)
    • Method Detail

      • satisfiedBy

        public boolean satisfiedBy​(T testedInstance)
        Description copied from interface: Predicate
        Returns whether the given instance satisfies this predicate.
        Specified by:
        satisfiedBy in interface Predicate<T>