public class AlphanumComparator extends Object implements Comparator<CharSequence>
| Modifier and Type | Field and Description |
|---|---|
static ComparatorContext |
CONTEXT |
static ComparatorContext |
CONTEXT_IGNORE_CASE |
| Constructor and Description |
|---|
AlphanumComparator()
Creates a case sensitive comparator to use the alphanum algorithm to compare the strings.
|
AlphanumComparator(boolean caseSensitive)
Creates a comparator to use the alphanum algorithm to compare the strings.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(CharSequence s1,
CharSequence s2) |
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 AlphanumComparator()
public AlphanumComparator(boolean caseSensitive)
caseSensitive - true or false.public int compare(CharSequence s1, CharSequence s2)
compare in interface Comparator<CharSequence>public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - true or false.Copyright © 2017. All rights reserved.