| java.lang.Object com.jamonapi.utils.JAMonArrayComparator
JAMonArrayComparator | public class JAMonArrayComparator extends java.lang.Object implements Comparator(Code) | | Note I took this code from fdsapi.com, and would like to eventually merge these 2 projects, so
this class will eventually be replaced by the one in FDS.
|
Constructor Summary | |
public | JAMonArrayComparator() | public | JAMonArrayComparator(int sortCol, boolean naturalOrder) Sort/compare the passed in col number starting at 0 in natural (true) or reverse (false)
order based on the columns Compareable interface being called. |
JAMonArrayComparator | public JAMonArrayComparator()(Code) | | |
JAMonArrayComparator | public JAMonArrayComparator(int sortCol, boolean naturalOrder)(Code) | | Sort/compare the passed in col number starting at 0 in natural (true) or reverse (false)
order based on the columns Compareable interface being called.
Parameters: sortCol - Parameters: naturalOrder - |
addCompareCol | public void addCompareCol(int sortCol)(Code) | | Compare the passed in col in natural order
|
addCompareCol | public void addCompareCol(int sortCol, boolean naturalOrder)(Code) | | Compare the passed in col in natural or reverse order
|
addCompareCol | public void addCompareCol(int sortCol, Comparator comparator)(Code) | | Compare the passed in col based on the passed in Comparator
|
compare | public int compare(Object o1, Object o2)(Code) | | Method used by the comparator interface.
o1 < o2 - returns a negative integer
o1==o2 - returns zero
o1>o2 - returns a postitive integer
Iterate through all columns that should be compared (in the proper order)
and call the Comparator for each of the column elements.
|
|
|