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, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final ConverterComparator INSTANCE
public final int compare(Converter<?> firstConverter, Converter<?> secondConverter)
Converter
s, 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 Converter
s are not otherwise semantically equal.
compare
in interface Comparator<Converter<?>>
firstConverter
- the first of two Converter
s; may be
null
secondConverter
- the second of two Converter
s; 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 casesConverter
Copyright © 2019–2021, microBean™. All rights reserved.