Class FileEntryComparator
- java.lang.Object
-
- com.webcodepro.applecommander.storage.FileEntryComparator
-
- All Implemented Interfaces:
java.util.Comparator<FileEntry>
public class FileEntryComparator extends java.lang.Object implements java.util.Comparator<FileEntry>
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
Constructors Constructor Description FileEntryComparator(int columnIndex, int displayMode)Construct a FileEntryComparator for the given columnIndex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(FileEntry entry1, FileEntry entry2)Compare two FileEntry objects.protected booleanisAllDigits(java.lang.String string)Test for digits in the screen.protected inttoInt(java.lang.String string)Convert String to int.
-
-
-
Method Detail
-
compare
public int compare(FileEntry entry1, FileEntry entry2)
Compare two FileEntry objects.- Specified by:
comparein interfacejava.util.Comparator<FileEntry>- See Also:
Comparator.compare(Object, Object)
-
isAllDigits
protected boolean isAllDigits(java.lang.String string)
Test for digits in the screen.
-
toInt
protected int toInt(java.lang.String string)
Convert String to int.
-
-