public class DatedStringComparator
extends java.lang.Object
implements java.util.Comparator
Constructor and Description |
---|
DatedStringComparator(int prefixFieldsNum)
Constructs a DatedStringComparator Object with the number of "_"
seperated fields as the string prefix.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object obj1,
java.lang.Object obj2)
Compares 2 dated strings, as described in compareStrings(x,y).
|
int |
compareStrings(java.lang.String str1,
java.lang.String str2)
Compares 2 Dated Strings.
|
public DatedStringComparator(int prefixFieldsNum)
prefixFieldsNum
- Number of prefix fields, separated by "_"public int compareStrings(java.lang.String str1, java.lang.String str2) throws java.lang.NumberFormatException
str1
- First stringstr2
- Second stringNumberFormatException,
- if the string is improperly formattedjava.lang.NumberFormatException
public int compare(java.lang.Object obj1, java.lang.Object obj2)
compare
in interface java.util.Comparator