T
- the type to compare by Object.toString()
.public final class ComparatorToString<T> extends Object implements Comparator<T>, Serializable
Comparator
that compares the given Objects by their
Object.toString()
value.
Constructor and Description |
---|
ComparatorToString()
Defcon.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(T o1,
T o2)
Compares both Objects by their
Object.toString() presentation. |
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 int compare(T o1, T o2) throws IllegalArgumentException
Object.toString()
presentation.
compare
in interface Comparator<T>
IllegalArgumentException
Comparator.compare(java.lang.Object, java.lang.Object)
Copyright © 2018. All rights reserved.