Interface EntryIndexComparator<EntryType>

Type Parameters:
EntryType - Entry that this Comparator function upon
All Known Implementing Classes:
MatrixEntryIndexComparatorMTJ, VectorEntryIndexComparator

public interface EntryIndexComparator<EntryType>

The EntryIndexComparator interface defines the functionality of a comparator for index entries. It is not a standard Comparator because it handles null entries in a graceful manner by having the return type indicate which parameter is null.

Justin Basilico

Nested Class Summary
static class EntryIndexComparator.Compare
          Indicates which of two iterators has the lowest index
Method Summary
 EntryIndexComparator.Compare lowestIndex(EntryType firstEntry, EntryType secondEntry)
          Determines which iterator has the lowest index

Method Detail


EntryIndexComparator.Compare lowestIndex(EntryType firstEntry,
                                         EntryType secondEntry)
Determines which iterator has the lowest index

firstEntry - first entry to consider
secondEntry - second entry to consider
FIRST_LOWEST if firstIterator has lowest index, SECOND_LOWEST if secondIterator has lowest index, ENTRIES_EQUAL if both are equal BOTH_ENTRIES_NULL if both are null FIRST_ENTRY_NULL if first entry is null SECOND_ENTRY_NULL if second entryis null