java.lang.Object
net.metanotion.io.block.index.BSkipLevels.LevelComparator<K,V>
- Type Parameters:
K- the key typeV- 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 Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintcompare(SkipLevels<K, V> l, SkipLevels<K, V> r) Compare two SkipLevels.Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Constructor Details
LevelComparator
private LevelComparator()Orders the levels by their span counts.
Method Details
compare
Compare two SkipLevels.- Specified by:
comparein interfaceComparator<K extends Comparable<? super K>>- Parameters:
l- the first levelr- the second level- Returns:
- a negative integer, zero, or a positive integer