Package org.cyclos.impl.utils
Class ToStringComparator
- java.lang.Object
-
- org.cyclos.impl.utils.ToStringComparator
-
- All Implemented Interfaces:
Comparator<Object>
public class ToStringComparator extends Object implements Comparator<Object>
A comparator that uses the 2 object's toString to compare
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Object o1, Object o2)static <T> Comparator<T>instance()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
instance
public static final <T> Comparator<T> instance()
-
compare
public int compare(Object o1, Object o2)
- Specified by:
comparein interfaceComparator<Object>
-
-