|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.NumberedStringComparator
Comparator class for NumberedStrings. Can compare them by nr or name, name also in sorted writing...
Field Summary | |
static int |
BYADDNR
Sort by additional number |
static int |
BYNAME
Sort by name field with standard String comparation |
static int |
BYNAMEASNUMBER
Sort by name field and assume that it starts with a numeric value |
static int |
BYNORMALNAME
Sort by name field in special database conversion |
static int |
BYNR
Sort by numerical field |
private int |
mode
|
private static java.lang.String |
NUMBERDELIMITERS
|
Constructor Summary | |
NumberedStringComparator()
Sorts by numerical value |
|
NumberedStringComparator(int mx)
Sorts by given mode, use constants BYNR, BYNAME, or BYNORMALNAME |
Method Summary | |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two NumberedStrings. |
private int |
compareByNameAsNumber(java.lang.String s1,
java.lang.String s2)
|
boolean |
equals(java.lang.Object o)
|
int |
getMode()
Return sorting mode |
void |
setMode(int mx)
Set sorting mode explicitly |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BYNR
public static final int BYNAME
public static final int BYNORMALNAME
public static final int BYNAMEASNUMBER
public static final int BYADDNR
private static final java.lang.String NUMBERDELIMITERS
private int mode
Constructor Detail |
public NumberedStringComparator(int mx)
mx
- mode for sortingpublic NumberedStringComparator()
Method Detail |
public void setMode(int mx)
public int getMode()
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
private int compareByNameAsNumber(java.lang.String s1, java.lang.String s2)
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |