class PatternUtil {

    public static <K, V> Map<K, V> createExtractedMap(Map<K, V> map, Set<K> keys) {
        Map<K, V> retValue = new LinkedHashMap<K, V>();
        for (K key : keys) {
            retValue.put(key, map.get(key));
        }
        return retValue;
    }

    private  PatternUtil();

}