Class OrSpec<T>

  • Type Parameters:
    T - The target type for this Spec
    All Implemented Interfaces:
    Spec<T>

    public class OrSpec<T>
    extends CompositeSpec<T>
    A CompositeSpec which requires any one of its specs to be true in order to evaluate to true. Uses lazy evaluation.
    • Field Detail

      • EMPTY

        public static final OrSpec<?> EMPTY
    • Constructor Detail

      • OrSpec

        public OrSpec()
      • OrSpec

        public OrSpec​(Spec<? super T>... specs)
      • OrSpec

        public OrSpec​(java.lang.Iterable<? extends Spec<? super T>> specs)
    • Method Detail

      • isSatisfiedBy

        public boolean isSatisfiedBy​(T object)
      • empty

        public static <T> OrSpec<T> empty()