jdbm.helper
Class ComparableComparator<A extends java.lang.Comparable>

java.lang.Object
  extended by jdbm.helper.ComparableComparator<A>
Type Parameters:
A -
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<A>

public class ComparableComparator<A extends java.lang.Comparable>
extends java.lang.Object
implements java.util.Comparator<A>, java.io.Serializable

Compares comparables. Default comparator for most of java types

Author:
Jan Kotek
See Also:
Serialized Form

Field Summary
static java.util.Comparator INSTANCE
          use this instance, dont allocate new
 
Method Summary
 int compare(java.lang.Comparable o1, java.lang.Comparable o2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

INSTANCE

public static final java.util.Comparator INSTANCE
use this instance, dont allocate new

Method Detail

compare

public int compare(java.lang.Comparable o1,
                   java.lang.Comparable o2)
Specified by:
compare in interface java.util.Comparator<A extends java.lang.Comparable>


Cees de Groot (C) 2000. All rights reserved http://jdbm.sourceforge.net