public final class IntervalMaps extends Object
NavigableMap
into a TimeIterator
.Modifier and Type | Method | Description |
---|---|---|
static Comparator<Interval> |
getIntervalEndComparator() |
Retrieve a comparator that will order intervals by end ascending.
|
static <V> TimeIterator<V> |
iterator(NavigableMap<Interval,V> map) |
Returns a time iterator for the given map.
|
static <V> NavigableMap<Interval,V> |
of(Sample<V> first,
Sample<V>... others) |
Retrieves a navigable map initialized with the given values.
|
static <V> TimeIterator<V> |
supremum(NavigableMap<Interval,V> map,
Interval interval) |
Returns the supremum of interval on given map, that is an iterator that will iterate all map intervals overlapping the given interval parameter.
|
static <V> TimeIterator<V> |
supremumBackward(NavigableMap<Interval,V> map,
Interval interval) |
Reverse version of the supremum method.
|
public static Comparator<Interval> getIntervalEndComparator()
public static <V> NavigableMap<Interval,V> of(Sample<V> first, Sample<V>... others)
V
- Value Java typefirst
- First sampleothers
- Rest samplespublic static <V> TimeIterator<V> supremum(NavigableMap<Interval,V> map, Interval interval)
V
- Value Java typemap
- The map to iterateinterval
- Interval to use as a reference for the supremum intersectionpublic static <V> TimeIterator<V> supremumBackward(NavigableMap<Interval,V> map, Interval interval)
V
- Value Java typemap
- The map to iterateinterval
- Interval to use as a reference for the supremum intersectionpublic static <V> TimeIterator<V> iterator(NavigableMap<Interval,V> map)
V
- Value Java typemap
- The map to iterateCopyright © 2019. All rights reserved.