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

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.AbstractComparableValueBoundSpecification<T>
              extended by net.sourceforge.domian.specification.LessThanSpecification<T>
All Implemented Interfaces:
LeafSpecification<T>, Specification<T>, ValueBoundSpecification<T>

final class LessThanSpecification<T extends java.lang.Comparable>
extends AbstractComparableValueBoundSpecification<T>

Specification for comparing two objects.

This specification is value bound. The value is a java.lang.Comparable object, and candidate objects must be less than 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
LessThanSpecification(T value)
           
 
Method Summary
 RelationalOperator getBinaryRelation(java.lang.Boolean negated)
           
protected  java.lang.Boolean getDisjointDecision(RelationalOperator candidateRelationalOperator, T candidateOperandValue)
           
 java.lang.Boolean isSatisfiedBy(T candidate)
           
 
Methods inherited from class net.sourceforge.domian.specification.AbstractComparableValueBoundSpecification
getCompareValue, invert, isDisjointWith, isInvertible
 
Methods inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
equals, getBinaryRelation, getValue, hashCode
 
Methods inherited from class net.sourceforge.domian.specification.AbstractSpecification
and, containsSimpleCompositesOnly, containsValueBoundSpecificationsOnly, createValueBoundSpecification, getAllSpecifications, getNegatedSpecification, getNumberOfLevelsOfNegations, getType, hasConjunction, hasDisjunction, intersectsWith, isGeneralizationOf, isIntersectionOf, isOddNumber, isSpecialCaseOf, or, purify, toString, where
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.specification.Specification
and, getType, isGeneralizationOf, isSpecialCaseOf, or, where
 

Constructor Detail

LessThanSpecification

LessThanSpecification(T value)
Method Detail

getDisjointDecision

protected java.lang.Boolean getDisjointDecision(RelationalOperator candidateRelationalOperator,
                                                T candidateOperandValue)
Specified by:
getDisjointDecision in class AbstractValueBoundSpecification<T extends java.lang.Comparable>
Returns:
true if the given candidate relation/operand pair leads to a disjoint relationship with this value bound specification

getBinaryRelation

public RelationalOperator getBinaryRelation(java.lang.Boolean negated)
Specified by:
getBinaryRelation in class AbstractValueBoundSpecification<T extends java.lang.Comparable>
Parameters:
negated - when true the returned binary relation will be inverted
Returns:
the mathematical binary relation bound to this value bound specification

isSatisfiedBy

public java.lang.Boolean isSatisfiedBy(T candidate)


Copyright © 2006-2010. All Rights Reserved.