Class Specs


  • public class Specs
    extends Object
    Provides a number of Spec implementations.
    • Field Detail

      • SATISFIES_ALL

        public static final Spec<Object> SATISFIES_ALL
      • SATISFIES_NONE

        public static final Spec<Object> SATISFIES_NONE
    • Constructor Detail

      • Specs

        public Specs()
    • Method Detail

      • satisfyAll

        public static <T> Spec<T> satisfyAll()
      • satisfyNone

        public static <T> Spec<T> satisfyNone()
      • convertClosureToSpec

        public static <T> Spec<T> convertClosureToSpec​(Closure closure)
      • intersect

        public static <T> Spec<T> intersect​(Spec<? super T>... specs)
        Returns a spec that selects the intersection of those items selected by the given specs. Returns a spec that selects everything when no specs provided.
      • intersect

        public static <T> Spec<T> intersect​(Collection<? extends Spec<? super T>> specs)
        Returns a spec that selects the intersection of those items selected by the given specs. Returns a spec that selects everything when no specs provided.
      • union

        public static <T> Spec<T> union​(Spec<? super T>... specs)
        Returns a spec that selects the union of those items selected by the provided spec. Selects everything when no specs provided.
      • union

        public static <T> Spec<T> union​(Collection<? extends Spec<? super T>> specs)
        Returns a spec that selects the union of those items selected by the provided spec. Selects everything when no specs provided.
      • negate

        public static <T> Spec<T> negate​(Spec<? super T> spec)
        Returns a spec that selects everything that is not selected by the given spec.