Class ObjectComparator
java.lang.Object
clazzfish.monitor.util.ObjectComparator
- All Implemented Interfaces:
Serializable,Comparator<Object>
Compares two objects using their string representation.
Originally this comparator was part of the PatternTestin project.
- Author:
- oliver
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ObjectComparator
public ObjectComparator()
-
-
Method Details
-
compare
Compares two arbitrary objects by using the toString representation.- Specified by:
comparein interfaceComparator<Object>- Parameters:
o1- the object 1o2- the object 2- Returns:
- 0 if both are equals
- See Also:
-