|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.timeseries.TimeSeries.Iterator<E>
E - a TimeSeries.Entry typepublic abstract static class TimeSeries.Iterator<E extends TimeSeries.Entry<?,?>>
the Iterator to read a time series
This class provides a default implementation of an Iterator for subclasses to override.
| Field Summary | |
|---|---|
int |
length
the length of the time series |
protected int |
pos
Convention: we advance pos before using, e.g., ++pos. |
TimeSeries<?,?> |
ts
the time series to be iterated |
| Constructor Summary | |
|---|---|
TimeSeries.Iterator(TimeSeries<?,?> ts)
Construct an iterator to read a time series. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
abstract E |
next()
Get the next entry in the time series, if any. |
int |
position()
Get the current position in reading the time series. |
void |
remove()
Deprecated. a time series is immutable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final TimeSeries<?,?> ts
public final int length
protected int pos
pos before using, e.g., ++pos.
| Constructor Detail |
|---|
public TimeSeries.Iterator(TimeSeries<?,?> ts)
ts - a time series| Method Detail |
|---|
public abstract E next()
next in interface java.util.Iterator<E extends TimeSeries.Entry<?,?>>public boolean hasNext()
hasNext in interface java.util.Iterator<E extends TimeSeries.Entry<?,?>>public int position()
Convention: pos initializes to 0 before being read.
@Deprecated public void remove()
remove in interface java.util.Iterator<E extends TimeSeries.Entry<?,?>>
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||