Optional < Boolean > getBoolean ( String key ) { Object value = get ( key ) ; if ( value == null ) { return Optional . empty ( ) ; } if ( value instanceof Boolean ) { return Optional . of ( ( Boolean ) value ) ; } else if ( value instanceof String ) { return Optional . of ( Boolean . parseBoolean ( ( String ) value ) ) ; } else { throw new InvalidOntopConfigurationException ( "A boolean was expected: " + value ) ; } }
Returns the boolean value of the given key .