public static boolean getBoolean ( final String name , final boolean defaultValue ) { String value = get ( name ) ; if ( value == null ) { return defaultValue ; } value = value . trim ( ) . toLowerCase ( ) ; switch ( value ) { case "true" : case "yes" : case "1" : case "on" : return true ; case "false" : case "no" : case "0" : case "off" : return false ; default : return defaultValue ; } }
Returns system property as boolean .