public final class IntervalFloatMap extends IntervalMap<Float>
Constructor and Description |
---|
IntervalFloatMap()
Default constructor.
|
IntervalFloatMap(double[] keys,
float[] vals)
Constructor with an initial interval map.
|
IntervalFloatMap(int capacity)
Constructor with capacity.
|
Modifier and Type | Method and Description |
---|---|
float |
getFloat(Interval interval)
Get the value for the given interval.
|
float |
getFloat(Interval interval,
float defaultValue)
Get the value for the given interval.
|
Class<Float> |
getTypeClass()
Returns the value type class.
|
boolean |
isSupported(Estimator estimator)
Returns whether
estimator is supported. |
float[] |
toFloatArray()
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 IntervalFloatMap()
The map is empty with zero capacity.
public IntervalFloatMap(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 IntervalFloatMap(double[] keys, float[] vals)
The keys
array must be in the same format returned by
IntervalMap.getIntervals()
.
keys
- initial keys contentvals
- initial values contentpublic float getFloat(Interval interval)
interval
- intervalIllegalArgumentException
- if the element doesn't existpublic float getFloat(Interval interval, float defaultValue)
Return defaultValue
if the value is not found.
interval
- intervaldefaultValue
- default valuepublic float[] toFloatArray()
This method may return a reference to the underlying array so clients should make a copy if the array is written to.
public Class<Float> getTypeClass()
TimeMap
Copyright © 2007–2015 Gephi Consortium. All rights reserved.