All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tadt.standard.TemporalElement

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

public class TemporalElement
extends Object
implements Anchorable
The TemporalElement class implements the Anchorable interface for TemporalElements. A TemporalElement is a set of "coalesced" Periods. So a better name would be CoalescedPeriodSet, but we stick with this name for purely historical reasons. There are several different ways to implement this beast, we adopt a representation as an array of Instants that delimit the interior Periods.


Constructor Index

 o TemporalElement(Period[])
Construct a TemporalElement from an array of Periods.

Method Index

 o asInstantArray()
Retrieve the array of Instants from this TemporalElement.
 o asPeriodArray()
Retrieve the array of Periods from this TemporalElement.
 o earliestInstant()
Returns the earliest Instant in the TemporalElement.
 o earliestPeriod()
Returns the earliest Period in the TemporalElement.
 o enumerateInstants()
Create an Enumeration of Instants in the Anchorable.
 o enumeratePeriods()
Create an Enumeration of Periods in the Anchorable.
 o equals(Anchorable)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing TemporalElements directly.
 o equals(TemporalElement)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing TemporalElements directly.
 o hashCode()
Generate the hash code value, needed for supporting Hashtables.
 o image()
Build a nice string image of an TemporalElement, for debugging mostly
 o kind()
Return the name of this class.
 o latestInstant()
Returns the latest Instant in the TemporalElement.
 o latestPeriod()
Returns the latest Period in the TemporalElement.
 o newInstance(String, Instant[])
Construct a new instance of a TemporalElement, Interval combination
 o newInstance(String, Period[])
Construct a new instance of a TemporalElement, Interval combination

Constructors

 o TemporalElement
  public TemporalElement(Period p[])
Construct a TemporalElement from an array of Periods.

Parameters:
periods - - array of Periods

Methods

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

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

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 TemporalElements directly.

Parameters:
other - - Anchorable to compare
Returns:
true or false
 o equals
  public boolean equals(TemporalElement other)
Test for equality, needed only for supporting Hashtables, use equalTo for comparing TemporalElements directly.

Parameters:
other - - TemporalElement to compare
Returns:
true or false
 o earliestPeriod
  public Period earliestPeriod()
Returns the earliest Period in the TemporalElement.

Returns:
Period - the Period
 o latestPeriod
  public Period latestPeriod()
Returns the latest Period in the TemporalElement.

Returns:
the latest Period
 o earliestInstant
  public Instant earliestInstant()
Returns the earliest Instant in the TemporalElement.

Returns:
Instant - the Instant
 o latestInstant
  public Instant latestInstant()
Returns the latest Instant in the TemporalElement.

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

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

 o asPeriodArray
  public Period[] asPeriodArray()
Retrieve the array of Periods from this TemporalElement.

Returns:
array of Periods (in order from earliest to latest)
 o asInstantArray
  public Instant[] asInstantArray()
Retrieve the array of Instants from this TemporalElement.

Returns:
array of Instants (in order from earliest to latest)
 o kind
  public String kind()
Return the name of this class.

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

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

Returns:
- new Anchorable

All Packages  Class Hierarchy  This Package  Previous  Next  Index