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