SpecificationNot

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

Subclasses represent the logical inverse of a Specification s. An implementation should instantiate the Specification s to be satisfied in its constructor.

For example:

public class NoSugarThanksSpec extends SpecificationNot {
    public NoSugarThanksSpec() {
        super(
            new TwoLumpsOfSugarSpec(),
        );
    }
}

API

SpecificationNot.java
class SpecificationNot {
  SpecificationNot(Specification specification)
  String satisfies(Object obj)
}