org.qi4j.functional
Class Specifications

java.lang.Object
  extended by org.qi4j.functional.Specifications

public class Specifications
extends java.lang.Object

Common generic specification expressions


Nested Class Summary
static class Specifications.AndSpecification<T>
          AND Specification.
static class Specifications.OrSpecification<T>
          OR Specification.
 
Constructor Summary
Specifications()
           
 
Method Summary
static
<T> Specifications.AndSpecification<T>
and(java.lang.Iterable<Specification<T>> specifications)
           
static
<T> Specifications.AndSpecification<T>
and(Specification<T>... specifications)
           
static
<T> Specification<T>
in(java.lang.Iterable<T> allowed)
           
static
<T> Specification<T>
in(T... allowed)
           
static
<T> Specification<T>
not(Specification<T> specification)
           
static
<T> Specification<T>
notNull()
           
static
<T> Specifications.OrSpecification<T>
or(java.lang.Iterable<Specification<T>> specifications)
           
static
<T> Specifications.OrSpecification<T>
or(Specification<T>... specifications)
           
static
<FROM,TO> Specification<FROM>
translate(Function<FROM,TO> function, Specification<? super TO> specification)
           
static
<T> Specification<T>
TRUE()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Specifications

public Specifications()
Method Detail

TRUE

public static <T> Specification<T> TRUE()

not

public static <T> Specification<T> not(Specification<T> specification)

and

public static <T> Specifications.AndSpecification<T> and(Specification<T>... specifications)

and

public static <T> Specifications.AndSpecification<T> and(java.lang.Iterable<Specification<T>> specifications)

or

public static <T> Specifications.OrSpecification<T> or(Specification<T>... specifications)

or

public static <T> Specifications.OrSpecification<T> or(java.lang.Iterable<Specification<T>> specifications)

in

public static <T> Specification<T> in(T... allowed)

in

public static <T> Specification<T> in(java.lang.Iterable<T> allowed)

notNull

public static <T> Specification<T> notNull()

translate

public static <FROM,TO> Specification<FROM> translate(Function<FROM,TO> function,
                                                      Specification<? super TO> specification)