org.chronicj.impl
Class IntersectionTE

java.lang.Object
  |
  +--org.chronicj.impl.CollectionTE
        |
        +--org.chronicj.impl.IntersectionTE
All Implemented Interfaces:
TemporalExpression

public class IntersectionTE
extends org.chronicj.impl.CollectionTE

Composite TemporalExpression that provides an intersection of the 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
IntersectionTE()
          Creates an instance of IntersectionTE.
 
Method Summary
 org.chronicj.impl.CollectionTE add(org.chronicj.TemporalExpression anExpression)
          Adds a TemporalExpression to be processed as part of the composition of this TemporalExpression.
 boolean containsExpressions()
          Getter for querying whether this (abstract) expression has been configured with any actual expressions.
 java.util.List getExpressions()
          Getter for expressions.
 boolean includes(org.chronicj.TimePoint aTimePoint)
          Used to check whether a given date is occurs within the current range expressed by this TemporalExpression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntersectionTE

public IntersectionTE()
Creates an instance of IntersectionTE.

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 org.chronicj.impl.CollectionTE
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

toString

public java.lang.String toString()
Overrides:
toString in class org.chronicj.impl.CollectionTE

getExpressions

public java.util.List getExpressions()
Getter for expressions.

Returns:
a List of temporal expression which compose this expression

add

public org.chronicj.impl.CollectionTE add(org.chronicj.TemporalExpression anExpression)
Adds a TemporalExpression to be processed as part of the composition of this TemporalExpression.

Parameters:
anExpression - the TemporalExpression to add
Returns:
a CollectionTE reference to the current instance (this), enabling easier syntax for building expressions

containsExpressions

public boolean containsExpressions()
Getter for querying whether this (abstract) expression has been configured with any actual expressions.

Returns:
true if 1 or more TemporalExpression has been added to this CollectionTE


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