source: src/main/java/agents/org/apache/commons/lang/enum1/package.html

Last change on this file was 127, checked in by Wouter Pasman, 6 years ago

#41 ROLL BACK of rev.126 . So this version is equal to rev. 125

File size: 1.9 KB
Line 
1<!--
2Licensed to the Apache Software Foundation (ASF) under one or more
3contributor license agreements. See the NOTICE file distributed with
4this work for additional information regarding copyright ownership.
5The 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
7the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17<html>
18<body>
19<p>
20<b>Deprecated</b> and replaced by {@link org.apache.commons.lang.enums}
21and will be removed in version 3.0.
22</p>
23<p>
24All classes in this package are deprecated and repackaged to {@link org.apache.commons.lang.enums}
25since <code>enum</code> is a Java 1.5 keyword.
26</p>
27<p>
28Provides an implementation of the C style <code>enum</code> in the Java world.
29</p>
30<p>
31The classic example being an RGB color enumeration.
32</p>
33<pre>
34public 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>
Note: See TracBrowser for help on using the repository browser.