se.citerus.dddsample.domain.shared
Class OrSpecification<T>

java.lang.Object
  extended by se.citerus.dddsample.domain.shared.AbstractSpecification<T>
      extended by se.citerus.dddsample.domain.shared.OrSpecification<T>
All Implemented Interfaces:
Specification<T>

public class OrSpecification<T>
extends AbstractSpecification<T>

OR specification, used to create a new specifcation that is the OR of two other specifications.


Constructor Summary
OrSpecification(Specification<T> spec1, Specification<T> spec2)
          Create a new OR specification based on two other spec.
 
Method Summary
 boolean isSatisfiedBy(T t)
          Check if t is satisfied by the specification.
 
Methods inherited from class se.citerus.dddsample.domain.shared.AbstractSpecification
and, not, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrSpecification

public OrSpecification(Specification<T> spec1,
                       Specification<T> spec2)
Create a new OR specification based on two other spec.

Parameters:
spec1 - Specification one.
spec2 - Specification two.
Method Detail

isSatisfiedBy

public boolean isSatisfiedBy(T t)
Check if t is satisfied by the specification.

Specified by:
isSatisfiedBy in interface Specification<T>
Specified by:
isSatisfiedBy in class AbstractSpecification<T>
Parameters:
t - Object to test.
Returns:
true if t satisfies the specification.


Copyright © 2009. All Rights Reserved.