@Override
    public V get(Object key) {
        if (!containsKey(key)) {
            throw new FacesException("Class " + clazz.getName() + " does not contain the constant " + key);
        }

        return super.get(key);
    }
Custom {@link LinkedHashMap} which throws an {@link FacesException} if the key/constant does not exist.

@param <K> The key type.
@param <V> The value type.
primefaces/src/main/java/org/primefaces/component/importconstants/ConstantsHashMap.java