public interface LongPairRangeSet<T extends Comparable<T>>
| Modifier and Type | Interface and Description |
|---|---|
static class |
LongPairRangeSet.DefaultRangeSet<T extends Comparable<T>>
Generic implementation of a default range set.
|
static class |
LongPairRangeSet.LongPair
This class is a simple key-value data structure.
|
static interface |
LongPairRangeSet.LongPairConsumer<T>
Represents a function that accepts two long arguments and produces a result.
|
static interface |
LongPairRangeSet.RangeProcessor<T extends Comparable<T>>
The interface exposing a method for processing of ranges.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOpenClosed(long lowerKey,
long lowerValue,
long upperKey,
long upperValue)
Adds the specified range (range that contains all values strictly greater than
lower and less than or equal to upper.) to this RangeSet (optional operation). |
Collection<com.google.common.collect.Range<T>> |
asRanges()
Returns a view of the disconnected ranges that make up this range set.
|
void |
clear() |
boolean |
contains(long key,
long value)
Determines whether any of this range set's member ranges contains
value. |
com.google.common.collect.Range<T> |
firstRange()
It returns very first smallest range in the rangeSet.
|
void |
forEach(LongPairRangeSet.RangeProcessor<T> action)
Performs the given action for each entry in this map until all entries have been processed
or action returns "false".
|
void |
forEach(LongPairRangeSet.RangeProcessor<T> action,
LongPairRangeSet.LongPairConsumer<? extends T> consumer)
Performs the given action for each entry in this map until all entries have been processed
or action returns "false".
|
boolean |
isEmpty() |
com.google.common.collect.Range<T> |
lastRange()
It returns very last biggest range in the rangeSet.
|
com.google.common.collect.Range<T> |
rangeContaining(long key,
long value)
Returns the unique range from this range set that contains
value, or
null if this range set does not contain value. |
void |
removeAtMost(long key,
long value)
Remove range that contains all values less than or equal to given key-value.
|
int |
size()
Returns total number of ranges into the set.
|
com.google.common.collect.Range<T> |
span()
Returns the minimal range which encloses all ranges in this range set.
|
void addOpenClosed(long lowerKey,
long lowerValue,
long upperKey,
long upperValue)
lower and less than or equal to upper.) to this RangeSet (optional operation). That is, for equal
range sets a and b, the result of a.add(range) is that a will be the minimal range set for which
both a.enclosesAll(b) and a.encloses(range).
@param lowerKey : value for key of lowerEndpoint of Range @param lowerValue: value for value of lowerEndpoint of Range @param upperKey : value for key of upperEndpoint of Range @param upperValue: value for value of upperEndpoint of Range
boolean contains(long key,
long value)
value.com.google.common.collect.Range<T> rangeContaining(long key, long value)
value, or
null if this range set does not contain value.void removeAtMost(long key,
long value)
key - value - boolean isEmpty()
void clear()
com.google.common.collect.Range<T> span()
Collection<com.google.common.collect.Range<T>> asRanges()
void forEach(LongPairRangeSet.RangeProcessor<T> action)
action - void forEach(LongPairRangeSet.RangeProcessor<T> action, LongPairRangeSet.LongPairConsumer<? extends T> consumer)
action - consumer - int size()
com.google.common.collect.Range<T> firstRange()
com.google.common.collect.Range<T> lastRange()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.