public class AlphanumFileComparator extends Object implements Comparator<File>
AlphanumComparator except changing it to use File instead of CharSequence.| Modifier and Type | Field and Description |
|---|---|
static ComparatorContext |
CONTEXT |
static ComparatorContext |
CONTEXT_IGNORE_CASE |
| Constructor and Description |
|---|
AlphanumFileComparator()
Creates a case sensitive comparator to use the alphanum algorithm to compare the strings.
|
AlphanumFileComparator(boolean caseSensitive)
Creates a comparator to use the alphanum algorithm to compare the strings.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(File f1,
File f2) |
boolean |
isCaseSensitive()
Checks if the case is sensitive when comparing.
|
void |
setCaseSensitive(boolean caseSensitive)
Sets the case sensitive flag.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic static final ComparatorContext CONTEXT
public static final ComparatorContext CONTEXT_IGNORE_CASE
public AlphanumFileComparator()
public AlphanumFileComparator(boolean caseSensitive)
caseSensitive - true or false.public int compare(File f1, File f2)
compare in interface Comparator<File>public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - true or false.Copyright © 2017. All rights reserved.