igpp.util
Class StringListComparator
java.lang.Object
igpp.util.StringListComparator
- All Implemented Interfaces:
- Comparator
public class StringListComparator
- extends Object
- implements Comparator
A Comparator
for ArrayList
of String
objects.
Can sort on specified "fields" in the array list and perform
both ascending and descending sorts.
- Version:
- 1.00 2009
- Author:
- Todd King
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortAscending
public static final int SortAscending
- See Also:
- Constant Field Values
SortDecending
public static final int SortDecending
- See Also:
- Constant Field Values
StringListComparator
public StringListComparator()
StringListComparator
public StringListComparator(int sortOn)
StringListComparator
public StringListComparator(int sortOn,
int direction)
compare
public int compare(Object o1,
Object o2)
- Specified by:
compare
in interface Comparator
Copyright © 2008-2009 Regents University of California. All Rights Reserved.