类 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.
  • 构造器详细资料

  • 方法详细资料

    • clear

      public void clear()
      指定者:
      clear 在接口中 LongPairRangeSet<T extends Comparable<T>>
    • addOpenClosed

      public void addOpenClosed(long key1, long value1, long key2, long value2)
      从接口复制的说明: LongPairRangeSet
      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). 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
       
      指定者:
      addOpenClosed 在接口中 LongPairRangeSet<T extends Comparable<T>>
    • contains

      public boolean contains(T position)
    • rangeContaining

      public com.google.common.collect.Range<T> rangeContaining(T position)
    • rangeContaining

      public com.google.common.collect.Range<T> rangeContaining(long key, long value)
      从接口复制的说明: LongPairRangeSet
      Returns the unique range from this range set that contains value, or null if this range set does not contain value.
      指定者:
      rangeContaining 在接口中 LongPairRangeSet<T extends Comparable<T>>
    • remove

      public void remove(com.google.common.collect.Range<T> range)
    • removeAtMost

      public void removeAtMost(long key, long value)
      从接口复制的说明: LongPairRangeSet
      Remove 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

      public com.google.common.collect.Range<T> span()
      从接口复制的说明: LongPairRangeSet
      Returns the minimal range which encloses all ranges in this range set.
      指定者:
      span 在接口中 LongPairRangeSet<T extends Comparable<T>>
      返回:
    • asRanges

      public Set<com.google.common.collect.Range<T>> asRanges()
      从接口复制的说明: LongPairRangeSet
      Returns a view of the disconnected ranges that make up this range set.
      指定者:
      asRanges 在接口中 LongPairRangeSet<T extends Comparable<T>>
      返回:
    • forEach

      public void forEach(LongPairRangeSet.RangeProcessor<T> action)
      从接口复制的说明: LongPairRangeSet
      Performs 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)
      从接口复制的说明: LongPairRangeSet
      Performs 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

      public void forEachRawRange(LongPairRangeSet.RawRangeProcessor action)
      从接口复制的说明: LongPairRangeSet
      Performs 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)
      从接口复制的说明: LongPairRangeSet
      Determines whether any of this range set's member ranges contains value.
      指定者:
      contains 在接口中 LongPairRangeSet<T extends Comparable<T>>
    • firstRange

      public com.google.common.collect.Range<T> firstRange()
      从接口复制的说明: LongPairRangeSet
      It returns very first smallest range in the rangeSet.
      指定者:
      firstRange 在接口中 LongPairRangeSet<T extends Comparable<T>>
      返回:
      first smallest range into the set
    • lastRange

      public com.google.common.collect.Range<T> lastRange()
      从接口复制的说明: LongPairRangeSet
      It 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)
      从接口复制的说明: LongPairRangeSet
      Return the number bit sets to true from lower (inclusive) to upper (inclusive).
      指定者:
      cardinality 在接口中 LongPairRangeSet<T extends Comparable<T>>
    • size

      public int size()
      从接口复制的说明: LongPairRangeSet
      Returns total number of ranges into the set.
      指定者:
      size 在接口中 LongPairRangeSet<T extends Comparable<T>>
      返回:
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object