Interface SequencedValue


public interface SequencedValue

The SequencedValue interface provides the abstraction of collection of values, which can be the values of a time-varying attribute in different periods when TDOM works in sequenced mode. Values are stored and returned as strings.


Method Summary
 int getLength()
          Returns the number of maximal periods, for which no two contiguous periods are associated with the same value.
 Period getTimestamp(int index)
          Returns the valid period of the indexth value in the collection.
 java.lang.String getValue(int index)
          Returns the indexth value in the collection.
 

Method Detail

getLength

public int getLength()
Returns the number of maximal periods, for which no two contiguous periods are associated with the same value.

Returns:
The number of values in the collection. The range of value indices is 0 to length-1 inclusive.

getValue

public java.lang.String getValue(int index)
                          throws TDOMException
Returns the indexth value in the collection. The range of the index is to the number of timestamps (returned by getLength()) in the collection minus 1.

Parameters:
index - Index into the collection.
Returns:
The string value at the indexth position in the collection, or null if that is not a valid index.
Throws:
TDOMException - Throw TDOMException with exception code INVALID_INDEX if the index is out of range.

getTimestamp

public Period getTimestamp(int index)
                    throws TDOMException
Returns the valid period of the indexth value in the collection. The range of index is from 0 to the number of timestamps in the collection minus 1.

Parameters:
index - Index into the collection.
Returns:
The valid period of the indexth value in the collection, or null if that is not a valid index.
Throws:
TDOMException - Throw TDOMException with exception code INVALID_INDEX if the index is out of range.