public final class TimestampShortMap extends TimestampMap<Short>
| Constructor and Description |
|---|
TimestampShortMap()
Default constructor.
|
TimestampShortMap(double[] keys,
short[] vals)
Constructor with an initial timestamp map.
|
TimestampShortMap(int capacity)
Constructor with capacity.
|
| Modifier and Type | Method and Description |
|---|---|
short |
getShort(double timestamp)
Get the value for the given timestamp.
|
short |
getShort(double timestamp,
short defaultValue)
Get the value for the given timestamp.
|
Class<Short> |
getTypeClass()
Returns the value type class.
|
boolean |
isSupported(Estimator estimator)
Returns whether
estimator is supported. |
short[] |
toShortArray()
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 TimestampShortMap()
The map is empty with zero capacity.
public TimestampShortMap(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 TimestampShortMap(double[] keys,
short[] vals)
The keys array must be sorted and contain no duplicates.
keys - initial keys contentvals - initial values contentpublic short getShort(double timestamp)
timestamp - timestampIllegalArgumentException - if the element doesn't existpublic short getShort(double timestamp,
short defaultValue)
Return defaultValue if the value is not found.
timestamp - timestampdefaultValue - default valuepublic Class<Short> getTypeClass()
TimeMapgetTypeClass in interface TimeMap<Double,Short>getTypeClass in class TimestampMap<Short>public short[] toShortArray()
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,Short>isSupported in class TimestampMap<Short>estimator - estimatorestimatorCopyright © 2007–2015 Gephi Consortium. All rights reserved.