com.timeindexing.time
Interface TimeSpecifier

All Superinterfaces:
java.lang.Cloneable, Value
All Known Implementing Classes:
AbstractTimeSpecifier, Day, EndOfDay, EndOfHour, EndOfMinute, EndOfMonth, EndOfSecond, EndOfWeek, EndOfYear, Hour, Microsecond, Millisecond, Minute, Month, Nanosecond, Now, Second, StartOfDay, StartOfHour, StartOfMinute, StartOfMonth, StartOfSecond, StartOfWeek, StartOfYear, Week, Year

public interface TimeSpecifier
extends java.lang.Cloneable, Value

An interface for objects that specify some specifier for a Timestamp.


Method Summary
 TimeSpecifier afterDoing(TimeSpecifier specifier)
          After doing the specfied TimeSpecifier, do this TimeSpecifier.
 Timestamp instantiate(Timestamp t)
          Instantiate this TimeSpecifier w.r.t a particular Timestamp.
 TimeSpecifier then(TimeSpecifier specifier)
          Do this TimeSpecifier, then do another TimeSpecifier.
 long value()
          Get the value.
 

Method Detail

then

public TimeSpecifier then(TimeSpecifier specifier)
Do this TimeSpecifier, then do another TimeSpecifier. This gets more modification. N.B. spec1.then(spec2) == spec2.afterDoing(spec1) spec1.then(spec2).then(spec3) == spec3.afterDoing(spec2.afterDoing(spec1))


afterDoing

public TimeSpecifier afterDoing(TimeSpecifier specifier)
After doing the specfied TimeSpecifier, do this TimeSpecifier. This gets more modification. N.B. spec1.then(spec2) == spec2.afterDoing(spec1) spec1.then(spec2).then(spec3) == spec3.afterDoing(spec2.afterDoing(spec1))


instantiate

public Timestamp instantiate(Timestamp t)
Instantiate this TimeSpecifier w.r.t a particular Timestamp. It returns a Timestamp which has been modified by the amount of the TimeSpecifier.


value

public long value()
Get the value. When TimeDirection is FORWARD_DT, then the value is positive, and when TimeDirection is BACKWARD_DT, then the value is negative.

Specified by:
value in interface Value