org.nakedobjects.applib.spec
Class SpecificationOr
java.lang.Object
org.nakedobjects.applib.spec.SpecificationOr
- All Implemented Interfaces:
- Specification
public abstract class SpecificationOr
- extends java.lang.Object
- implements Specification
Adapter to make it easy to perform boolean algebra on Specifications.
Subclasses represent the conjunction of multiple Specifications. An
implementation should instantiate the Specifications to be satisfied
in its constructor.
For example:
public class TeaOrCoffeeSpec extends SpecificationOr {
public TeaOrCoffeeSpec() {
super(
new MustBeTeaSpec(),
new MustBeCoffeeSpec()
);
}
}
- See Also:
SpecificationAnd,
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 |
SpecificationOr
public SpecificationOr(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.