public class NaturalOrderComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>
class is thread-safe. nulls not supported. (to support nulls, wrap in guava:
Ordering.from(NaturalOrderComparator.INSTANCE).nullsFirst()
)
Modifier and Type | Field and Description |
---|---|
static NaturalOrderComparator |
INSTANCE |
Constructor and Description |
---|
NaturalOrderComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.String a,
java.lang.String b) |
public static final NaturalOrderComparator INSTANCE