public class StringEncoderComparator extends Object implements Comparator
| Constructor and Description |
|---|
StringEncoderComparator()
Constructs a new instance.
|
StringEncoderComparator(StringEncoder stringEncoder)
Constructs a new instance with the given algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object o1,
Object o2)
Compares two strings based not on the strings
themselves, but on an encoding of the two
strings using the StringEncoder this Comparator
was created with.
|
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 StringEncoderComparator()
public StringEncoderComparator(StringEncoder stringEncoder)
stringEncoder - the StringEncoder used for comparisons.public int compare(Object o1, Object o2)
EncoderException is encountered, return 0.compare in interface Comparatoro1 - the object to compareo2 - the object to compare toComparableCopyright © 2020 Internet2. All rights reserved.