cascading.util
Class NullNotEquivalentComparator

java.lang.Object
  extended by cascading.util.NullNotEquivalentComparator
All Implemented Interfaces:
Serializable, Comparator<Comparable>

public class NullNotEquivalentComparator
extends Object
implements Comparator<Comparable>, Serializable

Class NullNotEquivalentComparator simply returns -1 if the lhs is null, 1 if the rhs is null, or the result of lhs.compareTo(rhs).

Use this Comparator when performing a CoGroup that needs SQL like semantics.

See Also:
Serialized Form

Constructor Summary
NullNotEquivalentComparator()
           
 
Method Summary
 int compare(Comparable lhs, Comparable rhs)
           
 
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

NullNotEquivalentComparator

public NullNotEquivalentComparator()
Method Detail

compare

public int compare(Comparable lhs,
                   Comparable rhs)
Specified by:
compare in interface Comparator<Comparable>


Copyright © 2007-2014 Concurrent, Inc. All Rights Reserved.