net.sourceforge.domian.specification
Class GreaterThanOrEqualSpecification<T extends java.lang.Comparable<T>>

java.lang.Object
  extended by net.sourceforge.domian.specification.AbstractSpecification<T>
      extended by net.sourceforge.domian.specification.AbstractValueBoundSpecification<T>
          extended by net.sourceforge.domian.specification.GreaterThanOrEqualSpecification<T>
All Implemented Interfaces:
LeafSpecification<T>, Specification<T>, ValueBoundSpecification<T>

final class GreaterThanOrEqualSpecification<T extends java.lang.Comparable<T>>
extends AbstractValueBoundSpecification<T>

Specification for comparing two objects.

This specification is value bound. The value is a java.lang.Comparable object, and candidate objects must be greater than or equal to this value to be approved by this specification.

Since:
0.1
Author:
Eirik Torske

Field Summary
 
Fields inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
originalValue, value
 
Fields inherited from class net.sourceforge.domian.specification.AbstractSpecification
type
 
Constructor Summary
GreaterThanOrEqualSpecification(T value)
           
 
Method Summary
 java.lang.String getOperator(java.lang.Boolean negated)
          Builds a string representation of the negated mathematical operator this value bound specification represents.
 java.lang.Boolean isSatisfiedBy(T candidate)
          Specification satisfaction.
 
Methods inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
equals, getOperator, getValue, hashCode
 
Methods inherited from class net.sourceforge.domian.specification.AbstractSpecification
getAllSpecifications, getType, isGeneralizationOf, isSpecialCaseOf, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.specification.Specification
getType, isGeneralizationOf, isSpecialCaseOf
 

Constructor Detail

GreaterThanOrEqualSpecification

GreaterThanOrEqualSpecification(T value)
Method Detail

getOperator

public java.lang.String getOperator(java.lang.Boolean negated)
Description copied from interface: ValueBoundSpecification
Builds a string representation of the negated mathematical operator this value bound specification represents. This representation is ready for use in Java, SQL, HQL, and JPQL code.

Parameters:
negated - when true the returned operator will be negated
Returns:
a string representation of the mathematical operator this value bound specification represents

isSatisfiedBy

public java.lang.Boolean isSatisfiedBy(T candidate)
Description copied from interface: Specification
Specification satisfaction.

Parameters:
candidate - The candidate object
Returns:
true only if this specification is satisfied by/approves the given candidate (null is never approved)


Copyright © 2006-2009. All Rights Reserved.