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 30 31 public final class Nest { 32 33 public Nest() { 34 super(); 35 } 36 37 public static final class ColorEnum extends Enum { 38 public static final ColorEnum RED = new ColorEnum("Red"); 39 public static final ColorEnum GREEN = new ColorEnum("Green"); 40 public static final ColorEnum BLUE = new ColorEnum("Blue"); 41 42 private ColorEnum(String color) { 43 super(color); 44 } 45 46 public static ColorEnum getEnum(String color) { 47 return (ColorEnum) getEnum(ColorEnum.class, color); 48 } 49 50 public static Map getEnumMap() { 51 return getEnumMap(ColorEnum.class); 52 } 53 54 public static List getEnumList() { 55 return getEnumList(ColorEnum.class); 56 } 57 58 public static Iterator iterator() { 59 return iterator(ColorEnum.class); 60 } 61 } 62 } 63 | Popular Tags |