java.lang.Object
net.metanotion.io.block.index.BSkipLevels.LevelComparator<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Serializable, Comparator<SkipLevels<K,V>>
Enclosing class:
BSkipLevels<K extends Comparable<? super K>, V>

private static class BSkipLevels.LevelComparator<K extends Comparable<? super K>, V>extends Object implements Comparator<SkipLevels<K,V>>, Serializable
Comparator for sorting levels in BSkipLevels.blvlfix(). Sorts in REVERSE order.
  • Constructor Details

    • LevelComparator

      private LevelComparator()
      Orders the levels by their span counts.
  • Method Details

    • compare

      public int compare(SkipLevels<K,V> l, SkipLevels<K,V> r)
      Compare two SkipLevels.
      Specified by:
      compare in interface Comparator<K extends Comparable<? super K>>
      Parameters:
      l - the first level
      r - the second level
      Returns:
      a negative integer, zero, or a positive integer