public final class ConverterComparator extends Object implements Comparator<Converter<?>>
Comparator that considers only the priority, if any, available from the Converter
instances being compared, in accordance with the minimal
requirements of the MicroProfile Config specification as spelled
out (only) in the Converter API
documentation.
This Comparator implementation is, and must be,
inconsistent with equals(),
as implied by the same specification.
compare(Converter, Converter),
Converter| Modifier and Type | Field and Description |
|---|---|
static ConverterComparator |
INSTANCE
The sole instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Converter<?> firstConverter,
Converter<?> secondConverter)
|
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 static final ConverterComparator INSTANCE
public final int compare(Converter<?> firstConverter, Converter<?> secondConverter)
Converters, returning -1 if the
first has a priority greater than that of
the second and 1 if the second has a priority greater than that of the first, and 0
in all other cases.
This method may return 0 when both Converters are not otherwise semantically equal.
compare in interface Comparator<Converter<?>>firstConverter - the first of two Converters; may be
nullsecondConverter - the second of two Converters; may
be null-1 if the first has a priority greater than that of the second and 1 if the
second has a priority greater than that of
the first, and 0 in all other casesConverterCopyright © 2019–2021, microBean™. All rights reserved.