org.opengts.util
Class ListTools.StringComparator<T>
java.lang.Object
org.opengts.util.ListTools.StringComparator<T>
- All Implemented Interfaces:
- java.util.Comparator<T>
- Direct Known Subclasses:
- ListTools.NameComparator
- Enclosing class:
- ListTools
public static class ListTools.StringComparator<T>
- extends java.lang.Object
- implements java.util.Comparator<T>
StringComparator class for sorting objects based on their 'toString()' value
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListTools.StringComparator
public ListTools.StringComparator()
ListTools.StringComparator
public ListTools.StringComparator(boolean ascending)
ListTools.StringComparator
public ListTools.StringComparator(boolean ascending,
boolean ignoreCase)
compare
public int compare(T o1,
T o2)
- Specified by:
compare
in interface java.util.Comparator<T>
getObjectString
public java.lang.String getObjectString(java.lang.Object obj)
getDefaultString
public java.lang.String getDefaultString(java.lang.Object obj)
equals
public boolean equals(java.lang.Object other)
- Specified by:
equals
in interface java.util.Comparator<T>
- Overrides:
equals
in class java.lang.Object