info.aduna.text
Class ToStringComparator

java.lang.Object
  extended by info.aduna.text.ToStringComparator
All Implemented Interfaces:
Comparator<Object>

public class ToStringComparator
extends Object
implements Comparator<Object>

Comparator that compares the String representations of two objects (using their toString() methods). The comparison is carried out by the collator for the current default domain of the JVM.

Author:
Herko ter Horst

Method Summary
 int compare(Object o1, Object o2)
           
static ToStringComparator getInstance()
          Get the only instance of the ToStringComparator.
 
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
 

Method Detail

getInstance

public static ToStringComparator getInstance()
Get the only instance of the ToStringComparator.

Returns:
the only instance of the ToStringComparator

compare

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


Copyright © 1997-2008 Aduna. All Rights Reserved.