org.nakedobjects.applib.spec
Class SpecificationAnd
java.lang.Object
org.nakedobjects.applib.spec.SpecificationAnd
- All Implemented Interfaces:
- Specification
public abstract class SpecificationAnd
- extends java.lang.Object
- implements Specification
Adapter to make it easy to perform boolean algebra on Specifications.
Subclasses represent the intersection of multiple Specifications. An
implementation should instantiate the Specifications to be satisfied
in its constructor.
For example:
public class MilkAndSugarSpec extends SpecificationAnd {
public MilkAndSugarSpec() {
super(
new MustBeMilkySpec(),
new TwoLumpsOfSugarSpec()
);
}
}
- See Also:
SpecificationOr,
SpecificationNot
|
Method Summary |
java.lang.String |
satisfies(java.lang.Object obj)
If null then satisfied, otherwise is reason why the specification is
not satisfied. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpecificationAnd
public SpecificationAnd(Specification... specifications)
satisfies
public java.lang.String satisfies(java.lang.Object obj)
- Description copied from interface:
Specification
- If null then satisfied, otherwise is reason why the specification is
not satisfied.
- Specified by:
satisfies in interface Specification
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.