public final class IntervalLongMap extends IntervalMap<Long>
Constructor and Description |
---|
IntervalLongMap()
Default constructor.
|
IntervalLongMap(double[] keys,
long[] vals)
Constructor with an initial interval map.
|
IntervalLongMap(int capacity)
Constructor with capacity.
|
Modifier and Type | Method and Description |
---|---|
long |
getLong(Interval interval)
Get the value for the given interval.
|
long |
getLong(Interval interval,
long defaultValue)
Get the value for the given interval.
|
Class<Long> |
getTypeClass()
Returns the value type class.
|
boolean |
isSupported(Estimator estimator)
Returns whether
estimator is supported. |
long[] |
toLongArray()
Returns an array of all values in this map.
|
clear, contains, contains, equals, get, get, getIntervals, hashCode, isEmpty, put, remove, size, toKeysArray, toString, toString, toString, toValuesArray
public IntervalLongMap()
The map is empty with zero capacity.
public IntervalLongMap(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 IntervalLongMap(double[] keys, long[] vals)
The keys
array must be in the same format returned by
IntervalMap.getIntervals()
.
keys
- initial keys contentvals
- initial values contentpublic long getLong(Interval interval)
interval
- intervalIllegalArgumentException
- if the element doesn't existpublic long getLong(Interval interval, long defaultValue)
Return defaultValue
if the value is not found.
interval
- intervaldefaultValue
- default valuepublic long[] toLongArray()
This method may return a reference to the underlying array so clients should make a copy if the array is written to.
public Class<Long> getTypeClass()
TimeMap
Copyright © 2007–2017 Gephi Consortium. All rights reserved.