public final class TimestampByteMap extends TimestampMap<Byte>
Constructor and Description |
---|
TimestampByteMap()
Default constructor.
|
TimestampByteMap(double[] keys,
byte[] vals)
Constructor with an initial timestamp map.
|
TimestampByteMap(int capacity)
Constructor with capacity.
|
Modifier and Type | Method and Description |
---|---|
byte |
getByte(double timestamp)
Get the value for the given timestamp.
|
byte |
getByte(double timestamp,
byte defaultValue)
Get the value for the given timestamp.
|
Class<Byte> |
getTypeClass()
Returns the value type class.
|
boolean |
isSupported(Estimator estimator)
Returns whether
estimator is supported. |
byte[] |
toByteArray()
Returns an array of all values in this map.
|
clear, contains, equals, get, get, getTimestamps, hashCode, isEmpty, put, remove, size, toKeysArray, toString, toString, toString, toValuesArray
public TimestampByteMap()
The map is empty with zero capacity.
public TimestampByteMap(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 TimestampByteMap(double[] keys, byte[] vals)
The keys
array must be sorted and contain no duplicates.
keys
- initial keys contentvals
- initial values contentpublic byte getByte(double timestamp)
timestamp
- timestampIllegalArgumentException
- if the element doesn't existpublic byte getByte(double timestamp, byte defaultValue)
Return defaultValue
if the value is not found.
timestamp
- timestampdefaultValue
- default valuepublic Class<Byte> getTypeClass()
TimeMap
getTypeClass
in interface TimeMap<Double,Byte>
getTypeClass
in class TimestampMap<Byte>
public byte[] toByteArray()
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)
TimeMap
estimator
is supported.isSupported
in interface TimeMap<Double,Byte>
isSupported
in class TimestampMap<Byte>
estimator
- estimatorestimator
Copyright © 2007–2017 Gephi Consortium. All rights reserved.