public static <K extends Key, M extends Map<K, Object>> M copy(
            final Map<? extends K, ?> origin, final Collection<? extends K> keySet,
            final boolean reset, final boolean ignoreOverhead, final M result) {

        if (ignoreOverhead || keySet.containsAll(origin.keySet())) {
            for (final K key : keySet) {
                final boolean containsKey = origin.containsKey(key);
                if (reset || containsKey) {
                    final Object value = containsKey ? origin.get(key) : key.getInitial();
                    result.put(key, valid(key, value));
                }
            }
            return result;
        } else {
            throw new IllegalArgumentException(format(ILLEGAL_KEYS, origin.keySet()));
        }
    }