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