com.simba.dsi.utilities
Class NullSafeStringComparator

java.lang.Object
  extended by com.simba.dsi.utilities.NullSafeStringComparator
All Implemented Interfaces:
java.util.Comparator<java.lang.String>

public class NullSafeStringComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>

Convenience class used to compare strings null safely.


Constructor Summary
NullSafeStringComparator()
          Constructor.
 
Method Summary
 int compare(java.lang.String left, java.lang.String right)
          Compare two strings case insensitive.
 
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

NullSafeStringComparator

public NullSafeStringComparator()
Constructor.

Method Detail

compare

public int compare(java.lang.String left,
                   java.lang.String right)
Compare two strings case insensitive.

Specified by:
compare in interface java.util.Comparator<java.lang.String>
Parameters:
left - The first string to be compared.
right - The second string to be compared.
Returns:
A negative integer, zero, or a positive integer as the first string is less than, equal to, or greater than the second.


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.