public static int compare ( String left , double right ) { if ( Decision . isNumber ( left ) ) { if ( left . length ( ) > 9 ) { try { return new BigDecimal ( left ) . compareTo ( new BigDecimal ( Caster . toString ( right ) ) ) ; } catch ( Exception e ) { } } return compare ( Caster . toDoubleValue ( left , Double . NaN ) , right ) ; } if ( Decision . isBoolean ( left ) ) return compare ( Caster . toBooleanValue ( left , false ) , right ) ; if ( left . length ( ) == 0 ) return - 1 ; char leftFirst = left . charAt ( 0 ) ; if ( leftFirst >= ' ' && leftFirst <= ' ' ) return left . compareToIgnoreCase ( Caster . toString ( right ) ) ; return leftFirst - ' ' ; }
compares a String with a double