trait KeyComparator[K] extends Comparator[K]
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- KeyComparator
- Comparator
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Abstract Value Members
- abstract def comparableKey(data: K): K
The key is used to create secondary indexes like HashIndex and BloomFilters.
The key is used to create secondary indexes like HashIndex and BloomFilters.
Useful for partially ordered keys.
For example if your key is
class MyData(id: Int, name: Optional[String]))
Suppose your key is MyData(1, "John") and your KeyComparator if on MyData.id then this comparableKey should return MyData(1, None) so you can search for keys like MyData(1, None) and get result MyData(1, "John").
This is called partial ordering and full reads on partial keys so you can store extra data with key without having to read the value.
- abstract def compare(arg0: K, arg1: K): Int
- Definition Classes
- Comparator
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def reversed(): Comparator[K]
- Definition Classes
- Comparator
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def thenComparing[U <: Comparable[_ >: U <: AnyRef]](arg0: Function[_ >: K <: AnyRef, _ <: U]): Comparator[K]
- Definition Classes
- Comparator
- def thenComparing[U <: AnyRef](arg0: Function[_ >: K <: AnyRef, _ <: U], arg1: Comparator[_ >: U <: AnyRef]): Comparator[K]
- Definition Classes
- Comparator
- def thenComparing(arg0: Comparator[_ >: K <: AnyRef]): Comparator[K]
- Definition Classes
- Comparator
- def thenComparingDouble(arg0: ToDoubleFunction[_ >: K <: AnyRef]): Comparator[K]
- Definition Classes
- Comparator
- def thenComparingInt(arg0: ToIntFunction[_ >: K <: AnyRef]): Comparator[K]
- Definition Classes
- Comparator
- def thenComparingLong(arg0: ToLongFunction[_ >: K <: AnyRef]): Comparator[K]
- Definition Classes
- Comparator
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()