com.timeindexing.time
Class IntervalTemplate

java.lang.Object
  extended bycom.timeindexing.time.AbstractIntervalSpecifier
      extended bycom.timeindexing.time.IntervalTemplate
All Implemented Interfaces:
java.lang.Cloneable, IntervalSpecifier

public class IntervalTemplate
extends AbstractIntervalSpecifier
implements IntervalSpecifier

An IntervalSpecifier that instantiates to a MidPointInterval.


Field Summary
static IntervalTemplate THIS_DAY
          A IntervalTemplate for today.
static IntervalTemplate THIS_HOUR
          A IntervalTemplate for this hour
static IntervalTemplate THIS_MINUTE
          A IntervalTemplate for this minute
static IntervalTemplate THIS_MONTH
          A IntervalTemplate for this month.
static IntervalTemplate THIS_SECOND
          A IntervalTemplate for this second
static IntervalTemplate THIS_WEEK
          A IntervalTemplate for this week.
static IntervalTemplate THIS_YEAR
          A IntervalTemplate for this year.
 
Constructor Summary
IntervalTemplate(TimeSpecifier start, TimeSpecifier end)
          Construct a IntervalTemplate.
 
Method Summary
 Interval instantiate(AbsoluteTimestamp t)
          Instantiate the IntervalTemplate w.r.t.
 java.lang.String toString()
          To String
 
Methods inherited from class com.timeindexing.time.AbstractIntervalSpecifier
clone, getEndSpecifier, getStartSpecifier
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.timeindexing.time.IntervalSpecifier
getEndSpecifier, getStartSpecifier
 

Field Detail

THIS_YEAR

public static final IntervalTemplate THIS_YEAR
A IntervalTemplate for this year.


THIS_MONTH

public static final IntervalTemplate THIS_MONTH
A IntervalTemplate for this month.


THIS_WEEK

public static final IntervalTemplate THIS_WEEK
A IntervalTemplate for this week.


THIS_DAY

public static final IntervalTemplate THIS_DAY
A IntervalTemplate for today.


THIS_HOUR

public static final IntervalTemplate THIS_HOUR
A IntervalTemplate for this hour


THIS_MINUTE

public static final IntervalTemplate THIS_MINUTE
A IntervalTemplate for this minute


THIS_SECOND

public static final IntervalTemplate THIS_SECOND
A IntervalTemplate for this second

Constructor Detail

IntervalTemplate

public IntervalTemplate(TimeSpecifier start,
                        TimeSpecifier end)
Construct a IntervalTemplate.

Method Detail

instantiate

public Interval instantiate(AbsoluteTimestamp t)
Instantiate the IntervalTemplate w.r.t. a Timestamp.

Specified by:
instantiate in interface IntervalSpecifier
Specified by:
instantiate in class AbstractIntervalSpecifier

toString

public java.lang.String toString()
To String