org.jcreme.filters
Class DoubleOrderFilter.DoubleComparator

java.lang.Object
  extended byorg.jcreme.filters.DoubleOrderFilter.DoubleComparator
All Implemented Interfaces:
java.util.Comparator, java.io.Serializable
Enclosing class:
DoubleOrderFilter

protected static class DoubleOrderFilter.DoubleComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

A Comparator that compares Double objects.

See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
protected DoubleOrderFilter.DoubleComparator()
           
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compares the passed in parameters if they are both Double 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
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DoubleOrderFilter.DoubleComparator

protected DoubleOrderFilter.DoubleComparator()
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Compares the passed in parameters if they are both Double objects.

Specified by:
compare in interface java.util.Comparator
Parameters:
obj1 - The first object to be used for comparison.
obj2 - The second object to be used for comparison.
Returns:
-2 if any of the passed in objects is not a Double object. 0, -1 or 1 respectively if the first number is respectively equal to, lesser than or greater than the second one.


Copyright 2006 null. All Rights Reserved.