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