类 LongPairRangeSet.DefaultRangeSet<T extends Comparable<T>>
java.lang.Object
org.apache.pulsar.common.util.collections.LongPairRangeSet.DefaultRangeSet<T>
- 类型参数:
T- the type of values in ranges.
- 所有已实现的接口:
LongPairRangeSet<T>
- 封闭接口:
- LongPairRangeSet<T extends Comparable<T>>
public static class LongPairRangeSet.DefaultRangeSet<T extends Comparable<T>>
extends Object
implements LongPairRangeSet<T>
Generic implementation of a default range set.
-
嵌套类概要
从接口继承的嵌套类/接口 org.apache.pulsar.common.util.collections.LongPairRangeSet
LongPairRangeSet.DefaultRangeSet<T extends Comparable<T>>, LongPairRangeSet.LongPair, LongPairRangeSet.LongPairConsumer<T>, LongPairRangeSet.RangeBoundConsumer<T>, LongPairRangeSet.RangeProcessor<T extends Comparable<T>>, LongPairRangeSet.RawRangeProcessor -
构造器概要
构造器构造器说明DefaultRangeSet(LongPairRangeSet.LongPairConsumer<T> consumer, LongPairRangeSet.RangeBoundConsumer<T> reverseConsumer) -
方法概要
修饰符和类型方法说明voidaddOpenClosed(long key1, long value1, long key2, long value2) Adds the specified range (range that contains all values strictly greater thanlowerand less than or equal toupper.) to thisRangeSet(optional operation).asRanges()Returns a view of the disconnected ranges that make up this range set.intcardinality(long lowerKey, long lowerValue, long upperKey, long upperValue) Return the number bit sets to true from lower (inclusive) to upper (inclusive).voidclear()booleancontains(long key, long value) Determines whether any of this range set's member ranges containsvalue.booleancom.google.common.collect.Range<T>It returns very first smallest range in the rangeSet.voidforEach(LongPairRangeSet.RangeProcessor<T> action) Performs the given action for each entry in this map until all entries have been processed or action returns "false".voidforEach(LongPairRangeSet.RangeProcessor<T> action, LongPairRangeSet.LongPairConsumer<? extends T> outerConsumer) Performs the given action for each entry in this map until all entries have been processed or action returns "false".voidPerforms the given action for each entry in this map until all entries have been processed or action returns "false".booleanisEmpty()com.google.common.collect.Range<T>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 containsvalue, ornullif this range set does not containvalue.com.google.common.collect.Range<T>rangeContaining(T position) voidvoidremoveAtMost(long key, long value) Remove range that contains all values less than or equal to given key-value.intsize()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.toString()
-
构造器详细资料
-
DefaultRangeSet
public DefaultRangeSet(LongPairRangeSet.LongPairConsumer<T> consumer, LongPairRangeSet.RangeBoundConsumer<T> reverseConsumer)
-
-
方法详细资料
-
clear
public void clear()- 指定者:
clear在接口中LongPairRangeSet<T extends Comparable<T>>
-
addOpenClosed
public void addOpenClosed(long key1, long value1, long key2, long value2) 从接口复制的说明:LongPairRangeSetAdds the specified range (range that contains all values strictly greater thanlowerand less than or equal toupper.) to thisRangeSet(optional operation). That is, for equal range sets a and b, the result ofa.add(range)is thatawill be the minimal range set for which botha.enclosesAll(b)anda.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
- 指定者:
addOpenClosed在接口中LongPairRangeSet<T extends Comparable<T>>
-
contains
-
rangeContaining
-
rangeContaining
从接口复制的说明:LongPairRangeSetReturns the unique range from this range set that containsvalue, ornullif this range set does not containvalue.- 指定者:
rangeContaining在接口中LongPairRangeSet<T extends Comparable<T>>
-
remove
-
removeAtMost
public void removeAtMost(long key, long value) 从接口复制的说明:LongPairRangeSetRemove range that contains all values less than or equal to given key-value.- 指定者:
removeAtMost在接口中LongPairRangeSet<T extends Comparable<T>>
-
isEmpty
public boolean isEmpty()- 指定者:
isEmpty在接口中LongPairRangeSet<T extends Comparable<T>>
-
span
从接口复制的说明:LongPairRangeSetReturns the minimal range which encloses all ranges in this range set.- 指定者:
span在接口中LongPairRangeSet<T extends Comparable<T>>- 返回:
-
asRanges
从接口复制的说明:LongPairRangeSetReturns a view of the disconnected ranges that make up this range set.- 指定者:
asRanges在接口中LongPairRangeSet<T extends Comparable<T>>- 返回:
-
forEach
从接口复制的说明:LongPairRangeSetPerforms the given action for each entry in this map until all entries have been processed or action returns "false". Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.)- 指定者:
forEach在接口中LongPairRangeSet<T extends Comparable<T>>
-
forEach
public void forEach(LongPairRangeSet.RangeProcessor<T> action, LongPairRangeSet.LongPairConsumer<? extends T> outerConsumer) 从接口复制的说明:LongPairRangeSetPerforms the given action for each entry in this map until all entries have been processed or action returns "false". Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.)- 指定者:
forEach在接口中LongPairRangeSet<T extends Comparable<T>>
-
forEachRawRange
从接口复制的说明:LongPairRangeSetPerforms the given action for each entry in this map until all entries have been processed or action returns "false". Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.) This method is optimized on reducing intermediate object creation. to do iteration jobs.- 指定者:
forEachRawRange在接口中LongPairRangeSet<T extends Comparable<T>>
-
contains
public boolean contains(long key, long value) 从接口复制的说明:LongPairRangeSetDetermines whether any of this range set's member ranges containsvalue.- 指定者:
contains在接口中LongPairRangeSet<T extends Comparable<T>>
-
firstRange
从接口复制的说明:LongPairRangeSetIt returns very first smallest range in the rangeSet.- 指定者:
firstRange在接口中LongPairRangeSet<T extends Comparable<T>>- 返回:
- first smallest range into the set
-
lastRange
从接口复制的说明:LongPairRangeSetIt returns very last biggest range in the rangeSet.- 指定者:
lastRange在接口中LongPairRangeSet<T extends Comparable<T>>- 返回:
- last biggest range into the set
-
cardinality
public int cardinality(long lowerKey, long lowerValue, long upperKey, long upperValue) 从接口复制的说明:LongPairRangeSetReturn the number bit sets to true from lower (inclusive) to upper (inclusive).- 指定者:
cardinality在接口中LongPairRangeSet<T extends Comparable<T>>
-
size
public int size()从接口复制的说明:LongPairRangeSetReturns total number of ranges into the set.- 指定者:
size在接口中LongPairRangeSet<T extends Comparable<T>>- 返回:
-
toString
-