@SuppressWarnings("unchecked")
    @Nullable
    public <T> T getMechanismProperty(final String key, @Nullable final T defaultValue) {
        notNull("key", key);

        T value = (T) mechanismProperties.get(key.toLowerCase());
        return (value == null) ? defaultValue : value;

    }
@SuppressWarnings("unchecked")
    @Nullable
    public <T> T getMechanismProperty(final String key, @Nullable final T defaultValue) {
        notNull("key", key);

        T value = (T) mechanismProperties.get(key.toLowerCase());
        return (value == null) ? defaultValue : value;

    }
@ SuppressWarnings ( "unchecked" ) @ Nullable public < T > T getMechanismProperty ( final String key , @ Nullable final T defaultValue ) { notNull ( "key" , key ) ; T value = ( T ) mechanismProperties . get ( key . toLowerCase ( ) ) ; return ( value == null ) ? defaultValue : value ; }
Get the value of the given key to a mechanism property, or defaultValue if there is no mapping.

@param key          the mechanism property key, which is treated as case-insensitive
@param defaultValue the default value, if no mapping exists
@param <T>          the value type
@return the mechanism property value
@since 2.12
Get the value of the given key to a mechanism property or defaultValue if there is no mapping .