Class IntSeries
java.lang.Object
com.frostwire.jlibtorrent.IntSeries
This is a limited capability data point series backed by
a circular buffer logic. Used to hold equally timed sample
of statistics.
-
Method Summary
Modifier and TypeMethodDescriptionlongget(int index) This method will always returns a value, but keep in mind that due to the nature of the circular buffer internal logic, if you pass past the size, you will get the sames values again.longlast()This method will always returns a value, if the series is empty0is returned.intsize()toString()
-
Method Details
-
get
public long get(int index) This method will always returns a value, but keep in mind that due to the nature of the circular buffer internal logic, if you pass past the size, you will get the sames values again. Usesize()for a proper boundary check.Usage example:
for (int i = min(series.size(), desired_count); i >= 0; i--) { plotMyValueAt(i, series.get(i)); }- Parameters:
index- the value's index- Returns:
- the value in the series
-
last
public long last()This method will always returns a value, if the series is empty0is returned.- Returns:
- the last value in the series
-
size
public int size() -
toString
-