|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webcodepro.applecommander.storage.FileEntryComparator
public class FileEntryComparator
Sort FileEntry objects by the columnIndex. Mostly useful to the interface. The columns are tested to see if they are numerical - if so, an Integer compare is done (instead of a String).
Date created: Oct 27, 2002 8:24:39 PM
Constructor Summary | |
---|---|
FileEntryComparator(int columnIndex,
int displayMode)
Construct a FileEntryComparator for the given columnIndex. |
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compare two FileEntry objects. |
protected boolean |
isAllDigits(java.lang.String string)
Test for digits in the screen. |
protected int |
toInt(java.lang.String string)
Convert String to int. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public FileEntryComparator(int columnIndex, int displayMode)
Method Detail |
---|
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
Comparator.compare(Object, Object)
protected boolean isAllDigits(java.lang.String string)
protected int toInt(java.lang.String string)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |