public String getRequiredString(String key) throws IllegalStateException {
        Optional<String> property = getString(key);
        if (property.isPresent()) {
            return property.get();
        } else {
            throw new IllegalStateException(String.format("required key [%s] not found", key));
        }
    }
public String getRequiredString ( String key ) throws IllegalStateException { Optional < String > property = getString ( key ) ; if ( property . isPresent ( ) ) { return property . get ( ) ; } else { throw new IllegalStateException ( String . format ( "required key [%s] not found" , key ) ) ; } }
Return the String property value associated with the given key (never {@code null}).

@return The String property
@throws IllegalStateException if the key cannot be resolved