messif.buckets.index
Interface OperationIndexComparator<K>

Type Parameters:
K - the type of the key arguments of the comparison
All Superinterfaces:
java.util.Comparator<K>, IndexComparator<K,LocalAbstractObject>, java.io.Serializable

public interface OperationIndexComparator<K>
extends IndexComparator<K,LocalAbstractObject>

A comparison function, which imposes a total ordering on some collection of keys. Objects stored in the index are compared using keys for ordering; the IndexComparator.extractKey(O) extracts a key for this comparator from any indexed object. The imposed order also corresponds to a certain QueryOperation, which can be obtained by createIndexOperation(java.util.Collection).

This IndexComparator is restricted to LocalAbstractObject only, so that the query operation can work for them.

See Also:
Comparator

Method Summary
 QueryOperation<?> createIndexOperation(java.util.Collection<? extends K> keys)
          Creates a query operation for the given keys.
 
Methods inherited from interface messif.buckets.index.IndexComparator
equals, extractKey, indexCompare
 
Methods inherited from interface java.util.Comparator
compare
 

Method Detail

createIndexOperation

QueryOperation<?> createIndexOperation(java.util.Collection<? extends K> keys)
Creates a query operation for the given keys. The returned operation represents the same ordering as this index comparator.

Parameters:
keys - the list of keys the operation searches for
Returns:
a new instance of query operation for the given keys