public class ReverseIndexComparator<V> extends java.lang.Object implements TupleComparator<java.lang.Long,V>
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
private org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> |
valueComparator
The value comparison to use - keys are Longs
|
| Constructor and Description |
|---|
ReverseIndexComparator(org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> valueComparator)
Creates an IndexComparator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareKey(java.lang.Long l1,
java.lang.Long l2)
Compares key Object to determine their sorting order returning a
value = to, < or > than 0.
|
int |
compareValue(V v1,
V v2)
Comparse value Objects to determine their sorting order returning a
value = to, < or > than 0.
|
org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<java.lang.Long> |
getKeyComparator()
Gets the comparator used to compare keys.
|
org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> |
getValueComparator()
Gets the binary comparator used to compare values which are the values
of attributes.
|
private static final long serialVersionUID
private final org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> valueComparator
public ReverseIndexComparator(org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> valueComparator)
valueComparator - the table comparator to use for valuespublic org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<java.lang.Long> getKeyComparator()
getKeyComparator in interface TupleComparator<java.lang.Long,V>public org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<V> getValueComparator()
getValueComparator in interface TupleComparator<java.lang.Long,V>public int compareKey(java.lang.Long l1,
java.lang.Long l2)
compareKey in interface TupleComparator<java.lang.Long,V>l1 - the first long key to comparel2 - the other long key to compare to the firstpublic int compareValue(V v1, V v2)
compareValue in interface TupleComparator<java.lang.Long,V>v1 - the first value to comparev2 - the other value to compare to the first