org.chronicj.impl
Class DifferenceTE

java.lang.Object
  |
  +--org.chronicj.impl.AbstractTemporalExpression
        |
        +--org.chronicj.impl.DifferenceTE
All Implemented Interfaces:
TemporalExpression

public class DifferenceTE
extends AbstractTemporalExpression

TemporalExpression that provides the difference of two composing expressions; for use in a set expression.

This class is based directly on patterns described in a paper by Martin Fowler which can be found here.

Author:
Matthew Lipper
See Also:
Recurring Events for Calendars by Martin Fowler

Constructor Summary
DifferenceTE(org.chronicj.TemporalExpression included, org.chronicj.TemporalExpression excluded)
          Creates an instance of DifferenceTE using two other TemporalExpressions such that the new expression matches dates/times based on the set defined by argument 1 - argument 2.
 
Method Summary
 boolean includes(org.chronicj.TimePoint aTimePoint)
          Used to check whether a given date is occurs within the current range expressed by this TemporalExpression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DifferenceTE

public DifferenceTE(org.chronicj.TemporalExpression included,
                    org.chronicj.TemporalExpression excluded)
Creates an instance of DifferenceTE using two other TemporalExpressions such that the new expression matches dates/times based on the set defined by argument 1 - argument 2.

Parameters:
included - the full TemporalExpression
excluded - the TemporalExpression that is "subtracted" from the full set
Throws:
java.lang.NullPointerException - if either argument is null
Method Detail

includes

public boolean includes(org.chronicj.TimePoint aTimePoint)
Description copied from interface: TemporalExpression
Used to check whether a given date is occurs within the current range expressed by this TemporalExpression.

Specified by:
includes in interface TemporalExpression
Specified by:
includes in class AbstractTemporalExpression
Parameters:
aTimePoint - the TimePoint to be checked for inclusion in the current set
Returns:
true or false, indicating whether the supplied TimePoint occurs within the current range


Copyright © 2003-2004 Digital Clash Software. All Rights Reserved.