udunits/src/main/java/ucar/units/PrefixSymbol.java
public final int
    compareTo(String string)
    {
	int	comp = string.length() - getID().length();
	return comp < 0
		? comp
		: comp == 0
		    ? (getID().compareTo(string) == 0 ? 0 : -1)
		    : (getID().compareTo(string.substring(0, getID().length()))
			== 0
			    ? 0
			    : -1);
    }
public final int
    compareTo(String string)
    {
	int	comp = string.length() - getID().length();
	return comp < 0
		? comp
		: comp == 0
		    ? (getID().compareTo(string) == 0 ? 0 : -1)
		    : (getID().compareTo(string.substring(0, getID().length()))
			== 0
			    ? 0
			    : -1);
    }
public final int compareTo ( String string ) { int comp = string . length ( ) - getID ( ) . length ( ) ; return comp < 0 ? comp : comp == 0 ? ( getID ( ) . compareTo ( string ) == 0 ? 0 : - 1 ) : ( getID ( ) . compareTo ( string . substring ( 0 , getID ( ) . length ( ) ) ) == 0 ? 0 : - 1 ) ; }
Compares this prefix against a String.  The sort keys are
decreasing length (major) and increasing lexicality (minor).
@param string		The string.
@return			A negative value, zero, or a positive value
depending on whether this PrefixSymbol is less
than, equal to, or greater than <code>
string</code>, respectively.
Compares this prefix against a String . The sort keys are decreasing length ( major ) and increasing lexicality ( minor ) .