public final class CharComparators extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CharComparators.NaturalImplicitComparator
A type-specific comparator mimicking the natural order.
|
protected static class |
CharComparators.OppositeComparator |
protected static class |
CharComparators.OppositeImplicitComparator
A type-specific comparator mimicking the opposite of the natural order.
|
| Modifier and Type | Field and Description |
|---|---|
static CharComparator |
NATURAL_COMPARATOR |
static CharComparator |
OPPOSITE_COMPARATOR |
| Modifier and Type | Method and Description |
|---|---|
static CharComparator |
asCharComparator(Comparator<? super Character> c)
Returns a type-specific comparator that is equivalent to the given comparator.
|
static CharComparator |
oppositeComparator(CharComparator c)
Returns a comparator representing the opposite order of the given comparator.
|
public static final CharComparator NATURAL_COMPARATOR
public static final CharComparator OPPOSITE_COMPARATOR
public static CharComparator oppositeComparator(CharComparator c)
c - a comparator.c.public static CharComparator asCharComparator(Comparator<? super Character> c)
c - a comparator, or null.c.Copyright © 2020. All rights reserved.