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

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

public class NotSpecification<T>
extends AbstractSpecification<T>

NOT decorator, used to create a new specifcation that is the inverse (NOT) of the given spec.


Constructor Summary
NotSpecification(Specification<T> spec1)
          Create a new NOT specification based on another 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

NotSpecification

public NotSpecification(Specification<T> spec1)
Create a new NOT specification based on another spec.

Parameters:
spec1 - Specification instance to not.
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.