public class ForwardIndexComparator<K> extends java.lang.Object implements TupleComparator<K,java.lang.Long>
| Modifier and Type | Field and Description |
|---|---|
private org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> |
keyComparator
The key comparison to use
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ForwardIndexComparator(org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> keyComparator)
Creates an IndexComparator.
|
| 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(java.lang.Long l1,
java.lang.Long l2)
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<java.lang.Long> |
getValueComparator()
Gets the binary comparator used to compare values which are the indices
into the master table.
|
private static final long serialVersionUID
private final org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> keyComparator
public ForwardIndexComparator(org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> keyComparator)
keyComparator - the table comparator to use for keyspublic org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<K> getKeyComparator()
getKeyComparator in interface TupleComparator<K,java.lang.Long>public org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<java.lang.Long> getValueComparator()
getValueComparator in interface TupleComparator<K,java.lang.Long>public int compareKey(K key1, K key2)
compareKey in interface TupleComparator<K,java.lang.Long>key1 - the first key to comparekey2 - the other key to compare to the firstpublic int compareValue(java.lang.Long l1,
java.lang.Long l2)
compareValue in interface TupleComparator<K,java.lang.Long>l1 - the first Long value to comparel2 - the other Long value to compare to the first