question: public static boolean parseBool ( String s ) { if ( s != null ) { if ( s . startsWith ( "true" ) || s . startsWith ( "on" ) || s . startsWith ( "yes" ) ) { return true ; } if ( s . startsWith ( "false" ) || s . startsWith ( "off" ) || s . equals ( "no" ) ) { return false ; } } throw new SolrException ( SolrException . ErrorCode . BAD_REQUEST , "invalid boolean value: " + s ) ; }
target:  how to transform a String into a boolean... more flexible than Boolean.parseBoolean() to enable easier integration with html forms.