info.aduna.text
Class NumericStringComparator
java.lang.Object
info.aduna.text.NumericStringComparator
- All Implemented Interfaces:
- Comparator<String>
public class NumericStringComparator
- extends Object
- implements Comparator<String>
Comparator that compares two String representing numbers. The Strings are
parsed as doubles. If the parsing fails, the two Strings are compared as-is.
- Author:
- Herko ter Horst
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumericStringComparator
public NumericStringComparator()
compare
public int compare(String oneString,
String otherString)
- Specified by:
compare in interface Comparator<String>
Copyright © 1997-2008 Aduna. All Rights Reserved.