T - the value typepublic interface TimeAddressable<T> extends Iterable<Observation<T>>
| Modifier and Type | Method and Description |
|---|---|
TimeIndexable<T> |
asIndexable()
Return an indexable time series corresponding to this one.
|
TimeAddressable<T> |
copy()
Return a copy of the time series.
|
T |
get(long index)
Return the value at the given numerical time index.
|
TimeAddressable<T> |
get(long first,
long last)
Return a new time series corresponding to the range between two numerical time indexes.
|
TimeAddressable<T> |
get(Range range)
Return a time series constructed from the given range of this series.
|
T |
get(TimeIndex time)
Return the value identified by the given time index.
|
Observation<T> |
getFirst(TimeIndex time)
Return the observation at or after the given time.
|
long |
getFirstIndex()
Return the numerical time index of the first element, or -1 when there is no data.
|
Observation<T> |
getLast(TimeIndex time)
Return the observation at or before the given time.
|
long |
getLastIndex()
Return the numerical time index of the last element, or -1 when there is no data.
|
T |
getMissingValue()
Return the object representing missing values.
|
Range |
getRange()
Return the range of the time series.
|
int |
getSize()
Return the number of values.
|
TimeDomain |
getTimeDomain()
Return the time domain of the time series.
|
Class<T> |
getType()
Return the type of he observations.
|
int |
getValueCount()
Return the number of non-missing values.
|
boolean |
isIndexable()
Return true if the time series implements
TimeIndexable. |
boolean |
isMissing(T value)
Return true if the given value is missing.
|
Iterator<Observation<T>> |
iterator()
Returns an iterator over the
Observations in the time series
ordered by increasing time index. |
TimeAddressable<T> |
makeEmptyCopy()
Make a copy of the time series but without the values.
|
void |
put(long time,
T value)
Put a value identified by a numerical time index into the time series.
|
void |
put(long time,
T[] values)
Put an array of values identified with the numerical time index of its
first element into the time series.
|
void |
put(TimeAddressable<T> values,
UpdateReviewer<T> reviewer)
Conditionally put all values from another time series into this time series.
|
void |
put(TimeIndex time,
T value)
Put a value identified by a time index into the time series.
|
void |
put(TimeIndex time,
T[] values)
Put an array of values identified with time index of its first element
into the time series.
|
void |
remove(TimeIndex time)
Remove the value identified by the time index.
|
boolean |
setRange(Range range)
Set the range to the intersection of the current range with the given range.
|
forEach, spliteratorIterator<Observation<T>> iterator()
Observations in the time series
ordered by increasing time index. This iterator does not return any
missing value.iterator in interface Iterable<Observation<T>>boolean isIndexable()
TimeIndexable.boolean isMissing(T value)
T getMissingValue()
T get(long index) throws T2Exception
index - a numberT2ExceptionT get(TimeIndex time) throws T2Exception
time - a non-null time indexT2ExceptionObservation<T> getLast(TimeIndex time) throws T2Exception
time - a time indexT2ExceptionObservation<T> getFirst(TimeIndex time) throws T2Exception
time - a time indexT2ExceptionTimeAddressable<T> get(long first, long last) throws T2Exception
first - a numerical time index giving the lower bound of the wanted rangelast - a numerical time index giving the upper bound of the wanted rangeT2ExceptionTimeAddressable<T> get(Range range) throws T2Exception
range - a non-null rangeT2Exceptionvoid put(TimeIndex time, T value) throws T2Exception
time - a non-null time indexvalue - a valueT2Exceptionvoid put(TimeIndex time, T[] values) throws T2Exception
time - a non-null time indexvalues - a non-null array of valuesT2Exceptionvoid put(long time,
T value)
throws T2Exception
time - a numerical time indexvalue - a valueT2Exceptionvoid put(long time,
T[] values)
throws T2Exception
time - a numerical time indexvalues - a non-null array of valuesT2Exceptionvoid put(TimeAddressable<T> values, UpdateReviewer<T> reviewer) throws T2Exception
Important note. When the implementation of the values time series
does not explicitly represent missing values (see SparseTimeSeries for example),
this method cannot be relied upon for "deleting" values of the target.
values - a non-null time seriesreviewer - a reviewerT2Exceptionvoid remove(TimeIndex time) throws T2Exception
time - a non-null time indexT2Exceptionint getSize()
int getValueCount()
Range getRange()
long getFirstIndex()
TimeIndex, use getRange().long getLastIndex()
TimeIndex, use getRange().boolean setRange(Range range) throws T2Exception
range - the new range will be the intersection of the current range with this oneT2ExceptionTimeDomain getTimeDomain()
TimeIndexable<T> asIndexable() throws T2Exception
T2ExceptionTimeAddressable<T> copy() throws T2Exception
T2ExceptionTimeAddressable<T> makeEmptyCopy()
Copyright © 2017. All rights reserved.