Class FileEntryComparator
java.lang.Object
com.webcodepro.applecommander.storage.FileEntryComparator
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionFileEntryComparator
(int columnIndex, int displayMode) Construct a FileEntryComparator for the given columnIndex. -
Method Summary
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
FileEntryComparator
public FileEntryComparator(int columnIndex, int displayMode) Construct a FileEntryComparator for the given columnIndex.
-
-
Method Details
-
compare
Compare two FileEntry objects.- Specified by:
compare
in interfaceComparator<FileEntry>
- See Also:
-
isAllDigits
Test for digits in the screen. -
toInt
Convert String to int.
-