KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > lang > enum > Extended1Enum


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.enum;
17
18 import java.util.Iterator;
19 import java.util.List;
20 import java.util.Map;
21
22 /**
23  * Base extended enumeration.
24  *
25  * @author Stephen Colebourne
26  * @version $Id: Extended1Enum.java 155423 2005-02-26 13:08:30Z dirkv $
27  */

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