KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > lang > enums > Extended2Enum


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.lang.enums;
17
18 import java.util.Iterator JavaDoc;
19 import java.util.List JavaDoc;
20 import java.util.Map JavaDoc;
21
22 /**
23  * Extended enumeration.
24  *
25  * @author Stephen Colebourne
26  * @version $Id: Extended2Enum.java 155423 2005-02-26 13:08:30Z dirkv $
27  */

28 public class Extended2Enum extends Extended1Enum {
29     public static final Extended1Enum GAMMA = new Extended2Enum("Gamma");
30
31     protected Extended2Enum(String JavaDoc color) {
32         super(color);
33     }
34
35     public static Extended1Enum getEnum(String JavaDoc name) {
36         return (Extended1Enum) getEnum(Extended2Enum.class, name);
37     }
38
39     public static Map JavaDoc getEnumMap() {
40         return getEnumMap(Extended2Enum.class);
41     }
42
43     public static List JavaDoc getEnumList() {
44         return getEnumList(Extended2Enum.class);
45     }
46
47     public static Iterator JavaDoc iterator() {
48         return iterator(Extended2Enum.class);
49     }
50
51 }
52
Popular Tags