public final class TimestampIntegerMap extends TimestampMap<Integer>
| Constructor and Description |
|---|
TimestampIntegerMap()
Default constructor.
|
TimestampIntegerMap(double[] keys,
int[] vals)
Constructor with an initial timestamp map.
|
TimestampIntegerMap(int capacity)
Constructor with capacity.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInteger(double timestamp)
Get the value for the given timestamp.
|
int |
getInteger(double timestamp,
int defaultValue)
Get the value for the given timestamp.
|
Class<Integer> |
getTypeClass()
Returns the value type class.
|
boolean |
isSupported(Estimator estimator)
Returns whether
estimator is supported. |
int[] |
toIntegerArray()
Returns an array of all values in this map.
|
clear, contains, equals, get, get, getTimestamps, hashCode, isEmpty, put, remove, size, toKeysArray, toString, toString, toString, toValuesArraypublic TimestampIntegerMap()
The map is empty with zero capacity.
public TimestampIntegerMap(int capacity)
Using this constructor can improve performances if the number of timestamps is known in advance as it minimizes array resizes.
capacity - timestamp capacitypublic TimestampIntegerMap(double[] keys,
int[] vals)
The keys array must be sorted and contain no duplicates.
keys - initial keys contentvals - initial values contentpublic int getInteger(double timestamp)
timestamp - timestampIllegalArgumentException - if the element doesn't existpublic int getInteger(double timestamp,
int defaultValue)
Return defaultValue if the value is not found.
timestamp - timestampdefaultValue - default valuepublic Class<Integer> getTypeClass()
TimeMapgetTypeClass in interface TimeMap<Double,Integer>getTypeClass in class TimestampMap<Integer>public int[] toIntegerArray()
This method may return a reference to the underlying array so clients should make a copy if the array is written to.
public boolean isSupported(Estimator estimator)
TimeMapestimator is supported.isSupported in interface TimeMap<Double,Integer>isSupported in class TimestampMap<Integer>estimator - estimatorestimatorCopyright © 2013–2015. All rights reserved.