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
Observation s 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, spliterator
Iterator<Observation<T>> iterator()
Observation
s 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 numberT2Exception
T get(TimeIndex time) throws T2Exception
time
- a non-null time indexT2Exception
Observation<T> getLast(TimeIndex time) throws T2Exception
time
- a time indexT2Exception
Observation<T> getFirst(TimeIndex time) throws T2Exception
time
- a time indexT2Exception
TimeAddressable<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 rangeT2Exception
TimeAddressable<T> get(Range range) throws T2Exception
range
- a non-null rangeT2Exception
void put(TimeIndex time, T value) throws T2Exception
time
- a non-null time indexvalue
- a valueT2Exception
void put(TimeIndex time, T[] values) throws T2Exception
time
- a non-null time indexvalues
- a non-null array of valuesT2Exception
void put(long time, T value) throws T2Exception
time
- a numerical time indexvalue
- a valueT2Exception
void put(long time, T[] values) throws T2Exception
time
- a numerical time indexvalues
- a non-null array of valuesT2Exception
void 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 reviewerT2Exception
void remove(TimeIndex time) throws T2Exception
time
- a non-null time indexT2Exception
int 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 oneT2Exception
TimeDomain getTimeDomain()
TimeIndexable<T> asIndexable() throws T2Exception
T2Exception
TimeAddressable<T> copy() throws T2Exception
T2Exception
TimeAddressable<T> makeEmptyCopy()
Copyright © 2017. All rights reserved.