1 | <!--
|
---|
2 | Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | contributor license agreements. See the NOTICE file distributed with
|
---|
4 | this work for additional information regarding copyright ownership.
|
---|
5 | The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | (the "License"); you may not use this file except in compliance with
|
---|
7 | the License. You may obtain a copy of the License at
|
---|
8 |
|
---|
9 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 |
|
---|
11 | Unless required by applicable law or agreed to in writing, software
|
---|
12 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | See the License for the specific language governing permissions and
|
---|
15 | limitations under the License.
|
---|
16 | -->
|
---|
17 | <html>
|
---|
18 | <body>
|
---|
19 | <p>
|
---|
20 | <b>Deprecated</b> and replaced by {@link org.apache.commons.lang.enums}
|
---|
21 | and will be removed in version 3.0.
|
---|
22 | </p>
|
---|
23 | <p>
|
---|
24 | All classes in this package are deprecated and repackaged to {@link org.apache.commons.lang.enums}
|
---|
25 | since <code>enum</code> is a Java 1.5 keyword.
|
---|
26 | </p>
|
---|
27 | <p>
|
---|
28 | Provides an implementation of the C style <code>enum</code> in the Java world.
|
---|
29 | </p>
|
---|
30 | <p>
|
---|
31 | The classic example being an RGB color enumeration.
|
---|
32 | </p>
|
---|
33 | <pre>
|
---|
34 | public final class ColorEnum extends Enum {
|
---|
35 | public static final ColorEnum RED = new ColorEnum("Red");
|
---|
36 | public static final ColorEnum GREEN = new ColorEnum("Green");
|
---|
37 | public static final ColorEnum BLUE = new ColorEnum("Blue");
|
---|
38 |
|
---|
39 | private ColorEnum(String color) {
|
---|
40 | super(color);
|
---|
41 | }
|
---|
42 |
|
---|
43 | public static ColorEnum getEnum(String color) {
|
---|
44 | return (ColorEnum) getEnum(ColorEnum.class, color);
|
---|
45 | }
|
---|
46 |
|
---|
47 | public static Map getEnumMap() {
|
---|
48 | return getEnumMap(ColorEnum.class);
|
---|
49 | }
|
---|
50 |
|
---|
51 | public static List getEnumList() {
|
---|
52 | return getEnumList(ColorEnum.class);
|
---|
53 | }
|
---|
54 |
|
---|
55 | public static Iterator iterator() {
|
---|
56 | return iterator(ColorEnum.class);
|
---|
57 | }
|
---|
58 | }
|
---|
59 | </pre>
|
---|
60 | @since 1.0
|
---|
61 | </body>
|
---|
62 | </html>
|
---|