org.eigenbase.util
Class StringRepresentationComparator<T>

java.lang.Object
  extended by org.eigenbase.util.StringRepresentationComparator<T>
All Implemented Interfaces:
Comparator<T>

public class StringRepresentationComparator<T>
extends Object
implements Comparator<T>

StringRepresentationComparator compares two objects by comparing their Object.toString() representations.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/util/StringRepresentationComparator.java#9 $
Author:
John V. Sichi

Constructor Summary
StringRepresentationComparator()
           
 
Method Summary
 int compare(T o1, T o2)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringRepresentationComparator

public StringRepresentationComparator()
Method Detail

compare

public int compare(T o1,
                   T o2)
Specified by:
compare in interface Comparator<T>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Comparator<T>
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object