All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tadt.standard.Instant

java.lang.Object
   |
   +----tadt.standard.Instant

public class Instant
extends Object
implements Anchorable
The Instant class provides a set of basic operations available on an Instant such as arithmetic and comparison operations. An Instant is the only object that has a granularity. Periods are larger aggregations of Instants. This is the standard package that supports determinate operations. None of the operations are mutators, that is, they all create a new Instant if needed.


Constructor Index

 o Instant(Granularity, BigInteger)
Construct an Instant from a count of granules, known to be an BigInteger.
 o Instant(Granularity, TimeValue)
Construct an Instant from a TimeValue.

Method Index

 o add(Interval)
Add an Interval to this Instant
 o asInstantArray()
Retrieve the array of Instants (containing only one Instant) from this Instant.
 o asPeriodArray()
Retrieve the array of Periods (containing only one Period) from this Period.
 o asTimeValue()
Retrieve the TimeValue from this Instant
 o cast(Granularity)
Cast this Instant to the indicated granularity.
 o earliestInstant()
Returns the earliest (only!) Instant in the Instant.
 o earliestPeriod()
Returns the earliest (only!) Period in the Period.
 o enumerateInstants()
Create an Enumeration of Instants on the Anchorable.
 o enumeratePeriods()
Create an Enumeration of Periods on the Anchorable.
 o equals(Anchorable)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing Instants directly.
 o equals(Instant)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing Instants directly.
 o equalTo(Anchorable)
Is this Instant equalTo another Anchorable? Always false since the other thing is not an Instant.
 o equalTo(Instant)
Is this Instant EqualTo another?
 o first(Anchorable)
Returns the first Instant out of an Instant and an Anchorable
 o first(Instant)
Returns the first Instant out of two Instants
 o granularity()
Retrieve the Granularity from this Instant
 o greaterThan(Anchorable)
Is this Instant greaterThan another Anchorable?
 o greaterThan(Instant)
Is this Instant greaterThan another?
 o greaterThanOrEqualTo(Anchorable)
Is this Instant greaterThanOrEqualTo another Anchorable?
 o greaterThanOrEqualTo(Instant)
Is this Instant greaterThanOrEqualTo another?
 o hashCode()
Generate the hash code value, needed for supporting Hashtables.
 o image()
Build a nice string image of an Instant, for debugging mostly
 o kind()
Return the name of this class.
 o last(Anchorable)
Returns the last Instant out of an Instant and an Anchorable
 o last(Instant)
Returns the last Instant out of two Instants
 o latestInstant()
Returns the latest (only!) Instant in the Instant.
 o latestPeriod()
Returns the latest (only!) Period in the Period.
 o lessThan(Anchorable)
Is this Instant lessThan another Anchorable?
 o lessThan(Instant)
Is this Instant lessThan another Instant?
 o lessThanOrEqualTo(Anchorable)
Is this Instant lessThanOrEqualTo another Anchorable?
 o lessThanOrEqualTo(Instant)
Is this Instant lessThanOrEqualTo another?
 o newInstance(String, Instant[])
Construct a new instance of an Instant, Interval combination
 o newInstance(String, Period[])
Construct a new instance of an Instant, Interval combination
 o scale(Granularity)
Scale this Instant to the indicated granularity.
 o subtract(Instant)
Subtract an Instant from this Instant
 o subtract(Interval)
Subtract an Interval from this Instant

Constructors

 o Instant
  public Instant(Granularity g,
                 BigInteger granules)
Construct an Instant from a count of granules, known to be an BigInteger.

Parameters:
g - - granularity
granules - - distance in granules from the origin
 o Instant
  public Instant(Granularity g,
                 TimeValue tv)
Construct an Instant from a TimeValue.

Methods

 o image
  public String image()
Build a nice string image of an Instant, for debugging mostly

Returns:
String image of Instant
 o hashCode
  public int hashCode()
Generate the hash code value, needed for supporting Hashtables.

Returns:
int
Overrides:
hashCode in class Object
 o equals
  public boolean equals(Anchorable other)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing Instants directly. This will always return false since the other Anchorable is not an Instant.

Parameters:
other - - Instant to compare
Returns:
false
 o equals
  public boolean equals(Instant other)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing Instants directly.

Parameters:
other - - Instant to compare
Returns:
true or false
 o earliestInstant
  public Instant earliestInstant()
Returns the earliest (only!) Instant in the Instant.

Returns:
Instant - this Instant
 o latestInstant
  public Instant latestInstant()
Returns the latest (only!) Instant in the Instant.

Returns:
Instant - the Instant
 o earliestPeriod
  public Period earliestPeriod()
Returns the earliest (only!) Period in the Period.

Returns:
Period - this Period
 o latestPeriod
  public Period latestPeriod()
Returns the latest (only!) Period in the Period.

Returns:
Period - the Period
 o enumeratePeriods
  public Enumeration enumeratePeriods()
Create an Enumeration of Periods on the Anchorable.

 o enumerateInstants
  public Enumeration enumerateInstants()
Create an Enumeration of Instants on the Anchorable.

 o cast
  public Instant cast(Granularity g)
Cast this Instant to the indicated granularity. Note that it is not a mutator, it will create a new Anchorable. Implemented as identity function.

 o scale
  public Instant scale(Granularity g)
Scale this Instant to the indicated granularity. Note that it is not a mutator, it will create a new Instant. Implemented as identity function.

 o lessThan
  public ExtendedBoolean lessThan(Anchorable beta)
Is this Instant lessThan another Anchorable?

Parameters:
beta - - Anchorable to compare
Returns:
this < beta
 o lessThan
  public ExtendedBoolean lessThan(Instant beta)
Is this Instant lessThan another Instant?

Parameters:
beta - - Instant to compare
Returns:
this < beta
 o lessThanOrEqualTo
  public ExtendedBoolean lessThanOrEqualTo(Anchorable beta)
Is this Instant lessThanOrEqualTo another Anchorable?

Parameters:
beta - - Anchorable to compare
Returns:
this < beta
 o lessThanOrEqualTo
  public ExtendedBoolean lessThanOrEqualTo(Instant beta)
Is this Instant lessThanOrEqualTo another?

Parameters:
beta - - Instant to compare
Returns:
this <= beta
 o greaterThan
  public ExtendedBoolean greaterThan(Anchorable beta)
Is this Instant greaterThan another Anchorable?

Parameters:
beta - - Anchorable to compare
Returns:
this < beta
 o greaterThan
  public ExtendedBoolean greaterThan(Instant beta)
Is this Instant greaterThan another?

Parameters:
beta - - Instant to compare
Returns:
this > beta
 o equalTo
  public ExtendedBoolean equalTo(Anchorable beta)
Is this Instant equalTo another Anchorable? Always false since the other thing is not an Instant.

Parameters:
beta - - Anchorable to compare
Returns:
false
 o equalTo
  public ExtendedBoolean equalTo(Instant beta)
Is this Instant EqualTo another?

Parameters:
beta - - Instant to compare
Returns:
this == beta
 o greaterThanOrEqualTo
  public ExtendedBoolean greaterThanOrEqualTo(Anchorable beta)
Is this Instant greaterThanOrEqualTo another Anchorable?

Parameters:
beta - - Anchorable to compare
Returns:
this < beta
 o greaterThanOrEqualTo
  public ExtendedBoolean greaterThanOrEqualTo(Instant beta)
Is this Instant greaterThanOrEqualTo another?

Parameters:
beta - - Instant to compare
Returns:
this >= beta
 o add
  public Instant add(Interval beta)
Add an Interval to this Instant

Parameters:
beta - - Interval to add
Returns:
Instant - new Instant
 o subtract
  public Instant subtract(Interval beta)
Subtract an Interval from this Instant

Parameters:
beta - - Interval to subtract
Returns:
Instant - new Instant
 o first
  public Instant first(Anchorable beta)
Returns the first Instant out of an Instant and an Anchorable

Parameters:
beta - - Anchorable to compare with
Returns:
the earliest Instant
 o first
  public Instant first(Instant beta)
Returns the first Instant out of two Instants

Parameters:
beta - - Instant to compare with
Returns:
the earliest Instant
 o last
  public Instant last(Anchorable beta)
Returns the last Instant out of an Instant and an Anchorable

Parameters:
beta - - Anchorable to compare with
Returns:
the latest Instant
 o last
  public Instant last(Instant beta)
Returns the last Instant out of two Instants

Parameters:
beta - - Instant to compare with
Returns:
the latest Instant
 o subtract
  public Interval subtract(Instant beta)
Subtract an Instant from this Instant

Parameters:
beta - - Instant to subtract
Returns:
resulting Interval
 o asPeriodArray
  public Period[] asPeriodArray()
Retrieve the array of Periods (containing only one Period) from this Period.

Returns:
array of Perids with one Period in it.
 o asInstantArray
  public Instant[] asInstantArray()
Retrieve the array of Instants (containing only one Instant) from this Instant.

Returns:
array of Instants with one Instant in it.
 o granularity
  public Granularity granularity()
Retrieve the Granularity from this Instant

Returns:
Granularity object
 o kind
  public String kind()
Return the name of this class.

Returns:
String
 o asTimeValue
  public TimeValue asTimeValue()
Retrieve the TimeValue from this Instant

Returns:
TimeValue
 o newInstance
  public Anchorable newInstance(String beta,
                                Period i[])
Construct a new instance of an Instant, Interval combination

Returns:
- new Anchorable
 o newInstance
  public Anchorable newInstance(String beta,
                                Instant i[])
Construct a new instance of an Instant, Interval combination

Returns:
- new Anchorable

All Packages  Class Hierarchy  This Package  Previous  Next  Index