SpecificationAnd

Adapter to make it easy to perform boolean algebra on Specification s.

Subclasses represent the intersection of multiple Specification s. An implementation should instantiate the Specification s to be satisfied in its constructor.

For example:

public class MilkAndSugarSpec extends SpecificationAnd {
    public MilkAndSugarSpec() {
        super(new MustBeMilkySpec(), new TwoLumpsOfSugarSpec());
    }
}

API

SpecificationAnd.java
class SpecificationAnd {
  SpecificationAnd(Specification... specifications)
  String satisfies(Object obj)
}