KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Extended enumeration.
24  *
25  * @author Stephen Colebourne
26  * @version $Id: Extended3Enum.java 155423 2005-02-26 13:08:30Z dirkv $
27  */

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