jdbm.helper
Class StringComparator

java.lang.Object
  extended by jdbm.helper.StringComparator
All Implemented Interfaces:
Serializable, Comparator<String>

public final class StringComparator
extends Object
implements Comparator<String>, Serializable

Comparator for String objects. Delegates to String.compareTo().

Author:
Alex Boisvert
See Also:
Serialized Form

Constructor Summary
StringComparator()
           
 
Method Summary
 int compare(String obj1, String obj2)
          Compare two objects.
 
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
 

Constructor Detail

StringComparator

public StringComparator()
Method Detail

compare

public int compare(String obj1,
                   String obj2)
Compare two objects.

Specified by:
compare in interface Comparator<String>
Parameters:
obj1 - First object
obj2 - Second object
Returns:
a positive integer if obj1 > obj2, 0 if obj1 == obj2, and a negative integer if obj1 < obj2


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.