org.chronicj.impl
Class UnionTE

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

public class UnionTE
extends org.chronicj.impl.CollectionTE

Composite TemporalExpression that provides a union 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
UnionTE()
          Creates an instance of UnionTE.
 
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

UnionTE

public UnionTE()
Creates an instance of UnionTE.

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

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

toString

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


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