Package com.mckoi.util
Interface IndexComparator
-
public interface IndexComparator
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.int
compare(int index1, java.lang.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'.
-
-
-
Method Detail
-
compare
int compare(int index1, java.lang.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'. If the indexed value is equal to 'val', it returns 0.
-
compare
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. If the indexed value's are equal, it returns 0.
-
-