org.semanticweb.HermiT.datatypes.datetime
Class DateTimeInterval

java.lang.Object
  extended by org.semanticweb.HermiT.datatypes.datetime.DateTimeInterval

public class DateTimeInterval
extends java.lang.Object


Field Summary
protected  IntervalType m_intervalType
           
protected  long m_lowerBound
           
protected  BoundType m_lowerBoundType
           
protected  long m_upperBound
           
protected  BoundType m_upperBoundType
           
 
Constructor Summary
DateTimeInterval(IntervalType intervalType, long lowerBound, BoundType lowerBoundType, long upperBound, BoundType upperBoundType)
           
 
Method Summary
 boolean containsDateTime(DateTime dateTime)
           
 void enumerateDateTimes(java.util.Collection<java.lang.Object> dateTimes)
           
 DateTimeInterval intersectWith(DateTimeInterval that)
          Computes the intersection of this interval with the supplied one.
protected  boolean isEqual(IntervalType intervalType, long lowerBound, BoundType lowerBoundType, long upperBound, BoundType upperBoundType)
           
protected static boolean isIntervalEmpty(IntervalType intervalType, long lowerBound, BoundType lowerBoundType, long upperBound, BoundType upperBoundType)
           
 int subtractSizeFrom(int argument)
          Subtracts from the given argument the number of distinct objects that are contained in this interval.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_intervalType

protected final IntervalType m_intervalType

m_lowerBound

protected final long m_lowerBound

m_lowerBoundType

protected final BoundType m_lowerBoundType

m_upperBound

protected final long m_upperBound

m_upperBoundType

protected final BoundType m_upperBoundType
Constructor Detail

DateTimeInterval

public DateTimeInterval(IntervalType intervalType,
                        long lowerBound,
                        BoundType lowerBoundType,
                        long upperBound,
                        BoundType upperBoundType)
Method Detail

intersectWith

public DateTimeInterval intersectWith(DateTimeInterval that)
Computes the intersection of this interval with the supplied one. If the two intervals do not intersect, the result is null.


isEqual

protected boolean isEqual(IntervalType intervalType,
                          long lowerBound,
                          BoundType lowerBoundType,
                          long upperBound,
                          BoundType upperBoundType)

subtractSizeFrom

public int subtractSizeFrom(int argument)
Subtracts from the given argument the number of distinct objects that are contained in this interval. If the interval contains more objects than argument, the result is zero.


containsDateTime

public boolean containsDateTime(DateTime dateTime)

enumerateDateTimes

public void enumerateDateTimes(java.util.Collection<java.lang.Object> dateTimes)

isIntervalEmpty

protected static boolean isIntervalEmpty(IntervalType intervalType,
                                         long lowerBound,
                                         BoundType lowerBoundType,
                                         long upperBound,
                                         BoundType upperBoundType)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object