List of usage examples for java.util EnumMap putAll
public void putAll(Map<? extends K, ? extends V> m)
From source file:Tutorial.java
public static void main(String[] args) { EnumMap<Tutorial, String> map1 = new EnumMap<Tutorial, String>(Tutorial.class); EnumMap<Tutorial, String> map2 = new EnumMap<Tutorial, String>(Tutorial.class); map1.put(Tutorial.CSS, "1"); map1.put(Tutorial.Python, "2"); map1.put(Tutorial.PHP, "3"); map1.put(Tutorial.Java, "4"); System.out.println("Map1: " + map1); System.out.println("Map2: " + map2); map2.putAll(map1); System.out.println("Map1: " + map1); System.out.println("Map2: " + map2); }
From source file:com.smartitengineering.cms.api.impl.type.ContentTypeImpl.java
public Map<ContentProcessingPhase, Collection<ContentCoProcessorDef>> getContentCoProcessorDefs() { final EnumMap<ContentProcessingPhase, Collection<ContentCoProcessorDef>> newMap = new EnumMap<ContentProcessingPhase, Collection<ContentCoProcessorDef>>( ContentProcessingPhase.class); newMap.putAll(procDefs); return newMap; }