public class FileNameComparator extends Object implements Comparator<String>, Serializable
| Constructor and Description |
|---|
FileNameComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(String name1,
String name2) |
protected String |
getChunk(String name,
int slength,
int marker)
Returns name chunk starting from marker position.
|
protected boolean |
isDigit(char character)
Returns whether or not specified character is digit.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(String name1, String name2)
compare in interface Comparator<String>protected String getChunk(String name, int slength, int marker)
name - full nameslength - full name lengthmarker - chunk starting positionprotected boolean isDigit(char character)
character - character to checktrue if specified character is digit, false otherwiseCopyright © 2020. All rights reserved.