com.partnersoft.v3x.data
Interface ArraySearchingGopher

All Known Implementing Classes:
InMemoryFindItemDump, PairArray, SortedListModel

public interface ArraySearchingGopher

A gopher for searching algorithms is an pluggable adapter that adapts a generic array searching algorithm to a specific data structure. This interface defines the typical actions required (comparison with a key).


Method Summary
 int compare(int a, java.lang.Object key)
          Compares the items at the two index positions using their natural ordering.
 int compare(int a, java.lang.Object key, java.util.Comparator comp)
          Compares the items at the two index positions using the given Comparator.
 int getSize()
          Returns the number of items in the array.
 

Method Detail

compare

int compare(int a,
            java.lang.Object key)
Compares the items at the two index positions using their natural ordering.


compare

int compare(int a,
            java.lang.Object key,
            java.util.Comparator comp)
Compares the items at the two index positions using the given Comparator.


getSize

int getSize()
Returns the number of items in the array.