| com.mckoi.util.IndexComparator
IndexComparator | public interface IndexComparator (Code) | | A comparator that is used within BlockIntegerList that compares two int
values which are indices to data that is being compared. For example, we
may have an BlockIntegerList that contains indices to cells in the column
of a table. To make a sorted list, we use this comparator to lookup the
index values in the list for sorting and searching.
author: Tobias Downer |
Method Summary | |
int | compare(int index1, Object val) Returns > 0 if the value pointed to by index1 is greater than 'val',
or < 0 if the value pointed to by index 1 is less than 'val'. | int | compare(int index1, int index2) Returns >0 if the value pointed to by index1 is greater than the value
pointed to by index2, or &tl; 0 if the value pointed to by index 1 is less
than the value pointed to by index 2. |
compare | int compare(int index1, Object val)(Code) | | Returns > 0 if the value pointed to by index1 is greater than 'val',
or < 0 if the value pointed to by index 1 is less than 'val'. If the
indexed value is equal to 'val', it returns 0.
|
compare | int compare(int index1, int index2)(Code) | | Returns >0 if the value pointed to by index1 is greater than the value
pointed to by index2, or &tl; 0 if the value pointed to by index 1 is less
than the value pointed to by index 2. If the indexed value's are equal,
it returns 0.
|
|
|