public static boolean isUnitless ( String unit ) { if ( unit == null ) return true ; String munge = unit . toLowerCase ( ) . trim ( ) ; munge = StringUtil2 . remove ( munge , ' ' ) ; return munge . length ( ) == 0 || munge . startsWith ( "numeric" ) || munge . startsWith ( "non-dim" ) || munge . startsWith ( "see" ) || munge . startsWith ( "proportion" ) || munge . startsWith ( "code" ) || munge . startsWith ( "0=" ) || munge . equals ( "1" ) ; }
The given unit is unitless .