import java.util.Collection;
import java.util.EnumMap;
import java.util.Set;

public class HelloEnumMap {
	
	enum Status {OK, WARN, ERROR}

	public static void main(String...args) {
		System.out.println("Hello EnumMap!");
		EnumMap<Status,Integer> statusCounts = new EnumMap<Status,Integer>(Status.class);
		statusCounts.put(Status.OK, 10);
		statusCounts.put(Status.WARN, 20);
		statusCounts.put(Status.ERROR, 5);
		
		int size = statusCounts.size();
		int countErrors = statusCounts.get(Status.ERROR);
		
		System.out.printf("Status counts: %s\n", statusCounts);
		System.out.printf("size = %s\n", size);
		System.out.printf("countErrors = %s\n", countErrors);

		Set<Status> keys = statusCounts.keySet();
		Collection<Integer> values = statusCounts.values();
		
		boolean containsKey = statusCounts.containsKey(Status.WARN);
		boolean containsValue = statusCounts.containsValue(99);
		
		System.out.printf("keys = %s\n", keys);
		System.out.printf("values = %s\n", values);
		System.out.printf("Contains key Status.WARN = %s\n", containsKey);
		System.out.printf("Contains value 99 = %s\n", containsValue);

		statusCounts.replace(Status.ERROR, statusCounts.get(Status.ERROR) + 1);
		System.out.printf("After replace with incremented Status.ERROR: %s\n", statusCounts);

		statusCounts.remove(Status.ERROR);
		System.out.printf("After removing Status.ERROR: %s\n", statusCounts);
		
		statusCounts.clear();
		System.out.printf("After Clearing all entries: %s\n", statusCounts);
	}
}

@@ -99,19 +99,21 @@
 umMap %7B%0A
-%09%0A%09
+%0A    
 enum Sta
@@ -117,16 +117,25 @@
 Status %7B
+%0A        
 OK, WARN
@@ -145,12 +145,20 @@
 RROR
-%7D%0A%0A%09
+%0A    %7D%0A%0A    
 publ
@@ -190,16 +190,17 @@
 g...
+ 
 args) %7B%0A
 %09%09Sy
@@ -195,18 +195,24 @@
 args) %7B%0A
-%09%09
+        
 System.o
@@ -241,18 +241,24 @@
 Map!%22);%0A
-%09%09
+        
 EnumMap%3C
@@ -256,32 +256,33 @@
  EnumMap%3CStatus,
+ 
 Integer%3E statusC
@@ -308,16 +308,17 @@
 %3CStatus,
+ 
 Integer%3E
@@ -333,18 +333,24 @@
 class);%0A
-%09%09
+        
 statusCo
@@ -370,26 +370,32 @@
 us.OK, 10);%0A
-%09%09
+        
 statusCounts
@@ -417,18 +417,24 @@
 N, 20);%0A
-%09%09
+        
 statusCo
@@ -460,21 +460,25 @@
 OR, 5);%0A
-%09%09%0A%09%09
+%0A        
 int size
@@ -501,18 +501,24 @@
 size();%0A
-%09%09
+        
 int coun
@@ -559,21 +559,25 @@
 ERROR);%0A
-%09%09%0A%09%09
+%0A        
 System.o
@@ -620,26 +620,32 @@
 tusCounts);%0A
-%09%09
+        
 System.out.p
@@ -672,18 +672,24 @@
  size);%0A
-%09%09
+        
 System.o
@@ -735,18 +735,24 @@
 rors);%0A%0A
-%09%09
+        
 Set%3CStat
@@ -785,18 +785,24 @@
 ySet();%0A
-%09%09
+        
 Collecti
@@ -845,21 +845,25 @@
 lues();%0A
-%09%09%0A%09%09
+%0A        
 boolean 
@@ -915,18 +915,24 @@
 .WARN);%0A
-%09%09
+        
 boolean 
@@ -979,21 +979,25 @@
 ue(99);%0A
-%09%09%0A%09%09
+%0A        
 System.o
@@ -1024,26 +1024,32 @@
 %5Cn%22, keys);%0A
-%09%09
+        
 System.out.p
@@ -1080,18 +1080,24 @@
 alues);%0A
-%09%09
+        
 System.o
@@ -1155,18 +1155,24 @@
 nsKey);%0A
-%09%09
+        
 System.o
@@ -1222,26 +1222,32 @@
 insValue);%0A%0A
-%09%09
+        
 statusCounts
@@ -1306,18 +1306,24 @@
 ) + 1);%0A
-%09%09
+        
 System.o
@@ -1401,18 +1401,24 @@
 unts);%0A%0A
-%09%09
+        
 statusCo
@@ -1444,18 +1444,24 @@
 ERROR);%0A
-%09%09
+        
 System.o
@@ -1526,13 +1526,17 @@
 s);%0A
-%09%09%0A%09%09
+%0A        
 stat
@@ -1557,10 +1557,16 @@
 ();%0A
-%09%09
+        
 Syst
@@ -1634,9 +1634,12 @@
 s);%0A
-%09
+    
 %7D%0A%7D%0A

Update HelloEnumMap.java