public class KeyOnlyComparator<K,V> extends Object implements TupleComparator<K,V>
Constructor and Description |
---|
KeyOnlyComparator(org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> comparator) |
Modifier and Type | Method and Description |
---|---|
int |
compareKey(K key1,
K key2)
Compares key Object to determine their sorting order returning a
value = to, < or > than 0.
|
int |
compareValue(V value1,
V value2)
Comparse value Objects to determine their sorting order returning a
value = to, < or > than 0.
|
org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> |
getKeyComparator()
Gets the comparator used to compare keys.
|
org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> |
getValueComparator()
Will throw an UnsupportedOperationException every time.
|
public KeyOnlyComparator(org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> comparator)
public org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> getKeyComparator()
getKeyComparator
in interface TupleComparator<K,V>
public org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> getValueComparator()
getValueComparator
in interface TupleComparator<K,V>
public int compareKey(K key1, K key2)
compareKey
in interface TupleComparator<K,V>
key1
- the first key to comparekey2
- the other key to compare to the firstpublic int compareValue(V value1, V value2)
compareValue
in interface TupleComparator<K,V>
value1
- the first value to comparevalue2
- the other value to compare to the firstCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.