org.xith3d.utility.comparator
Class StartsWithComparator

java.lang.Object
  extended by org.xith3d.utility.comparator.StartsWithComparator
All Implemented Interfaces:
java.util.Comparator<java.lang.String>

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

Compares to Strings by checking, if the first String starts with the second one.


Field Summary
static StartsWithComparator INSTANCE
           
 
Method Summary
 int compare(java.lang.String string1, java.lang.String string2)
          Compares to Strings by checking, if the first String starts with the second one.
 
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

INSTANCE

public static final StartsWithComparator INSTANCE
Method Detail

compare

public final int compare(java.lang.String string1,
                         java.lang.String string2)
Compares to Strings by checking, if the first String starts with the second one.

Specified by:
compare in interface java.util.Comparator<java.lang.String>
Parameters:
string1 -
string2 -