Package org.apache.commons.lang.enum

Deprecated and replaced by org.apache.commons.lang.enums and will be removed in version 3.0.

See:
          Description

Class Summary
Enum Deprecated. Replaced by org.apache.commons.lang.enums.Enum and will be removed in version 3.0.
EnumUtils Deprecated. Replaced by org.apache.commons.lang.enums.EnumUtils and will be removed in version 3.0.
ValuedEnum Deprecated. Replaced by org.apache.commons.lang.enums.ValuedEnum and will be removed in version 3.0.
 

Package org.apache.commons.lang.enum Description

Deprecated and replaced by org.apache.commons.lang.enums and will be removed in version 3.0.

All classes in this package are deprecated and repackaged to org.apache.commons.lang.enums since enum is a Java 1.5 keyword.

Provides an implementation of the C style enum in the Java world.

The classic example being an RGB color enumeration.

public final class ColorEnum extends Enum {
    public static final ColorEnum RED = new ColorEnum("Red");
    public static final ColorEnum GREEN = new ColorEnum("Green");
    public static final ColorEnum BLUE = new ColorEnum("Blue");

    private ColorEnum(String color) {
        super(color);
    }

    public static ColorEnum getEnum(String color) {
        return (ColorEnum) getEnum(ColorEnum.class, color);
    }

    public static Map getEnumMap() {
        return getEnumMap(ColorEnum.class);
    }

    public static List getEnumList() {
        return getEnumList(ColorEnum.class);
    }

    public static Iterator iterator() {
        return iterator(ColorEnum.class);
    }
}

Since:
1.0


Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.