net.sourceforge.domian.specification
Class AbstractComparableValueBoundSpecification<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>
All Implemented Interfaces:
LeafSpecification<T>, Specification<T>, ValueBoundSpecification<T>
Direct Known Subclasses:
GreaterThanSpecification, LessThanSpecification

abstract class AbstractComparableValueBoundSpecification<T extends java.lang.Comparable>
extends AbstractValueBoundSpecification<T>


Field Summary
private static long MILLISECONDS_PER_DAY
           
 
Fields inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
originalValue, value
 
Fields inherited from class net.sourceforge.domian.specification.AbstractSpecification
type
 
Constructor Summary
AbstractComparableValueBoundSpecification(T value)
           
 
Method Summary
protected  java.lang.Long getCompareValue(T candidateOperandValue)
           
private static long getDayNumberInEra(java.util.Date date)
           
protected  Specification<T> invert()
           
 java.lang.Boolean isDisjointWith(Specification<?> specification)
           
protected  java.lang.Boolean isInvertible()
           
private static boolean isMidnight(java.util.Date date)
           
 
Methods inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
equals, getBinaryRelation, getBinaryRelation, getDisjointDecision, 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, isSatisfiedBy, isSpecialCaseOf, or, where
 

Field Detail

MILLISECONDS_PER_DAY

private static long MILLISECONDS_PER_DAY
Constructor Detail

AbstractComparableValueBoundSpecification

AbstractComparableValueBoundSpecification(T value)
Method Detail

isInvertible

protected java.lang.Boolean isInvertible()
Overrides:
isInvertible in class AbstractSpecification<T extends java.lang.Comparable>

invert

protected Specification<T> invert()
Overrides:
invert in class AbstractValueBoundSpecification<T extends java.lang.Comparable>

getCompareValue

protected java.lang.Long getCompareValue(T candidateOperandValue)
Returns:
this value subtracted from the candidate value if possible; otherwise the compareTo} value if possible; otherwise null

isMidnight

private static boolean isMidnight(java.util.Date date)

getDayNumberInEra

private static long getDayNumberInEra(java.util.Date date)

isDisjointWith

public java.lang.Boolean isDisjointWith(Specification<?> specification)
Specified by:
isDisjointWith in interface Specification<T extends java.lang.Comparable>
Overrides:
isDisjointWith in class AbstractValueBoundSpecification<T extends java.lang.Comparable>


Copyright © 2006-2010. All Rights Reserved.