1 16 package org.apache.commons.lang.enum; 17 18 import java.util.Iterator; 19 import java.util.List; 20 import java.util.Map; 21 22 33 34 public final class NestBroken { 35 36 public static final ColorEnum RED = new ColorEnum("Red"); 37 public static final ColorEnum GREEN = new ColorEnum("Green"); 38 public static final ColorEnum BLUE = new ColorEnum("Blue"); 39 40 public NestBroken() { 41 super(); 42 } 43 44 public static final class ColorEnum extends Enum { 45 46 private ColorEnum(String color) { 47 super(color); 48 } 49 50 public static ColorEnum getEnum(String color) { 51 return (ColorEnum) getEnum(ColorEnum.class, color); 52 } 53 54 public static Map getEnumMap() { 55 return getEnumMap(ColorEnum.class); 56 } 57 58 public static List getEnumList() { 59 return getEnumList(ColorEnum.class); 60 } 61 62 public static Iterator iterator() { 63 return iterator(ColorEnum.class); 64 } 65 } 66 } 67 | Popular Tags |