Base class for enumerations.
An enumeration has a name as a unique identifier and it is passed as a constructor argument. This argument
is made optional and a setter is provided to allow server side Enum mapping, since this requires a no-args
constructor.
Comparing 2 enum instances with the equals() method will return true if the enums are of the same type and
have the same name.
Note: for enum mapping with BlazeDS, check the EnumProxy java class at http://bugs.adobe.com/jira/browse/BLZ-17
name:String [read-write]
Returns the name of this enum.
Implementation
public function get name():String
public function set name(value:String):void
public function Enum(name:String = "")
Creates a new Enum object.
Parameters
| name:String (default = "") — the name of the enum value
|
public function equals(other:Object):Boolean
Checks if this enum is equal to the other passed in enum.
To be equal, the 2 enums should be of the same type and should have the same name.
Parameters
| other:Object — the other enum with which to compare
|
Returns
| Boolean — true if this enum is equal to the other; false otherwise
|
public static function forName(name:String, clazz:Class):Enum
Returns the enum entry for the given class by its name.
Parameters
| name:String — the name of the enum entry to get
|
| |
| clazz:Class — the class that defines the enumeration
|
Returns
public function toString():String
Returns a string representation of this enum.
Returns
Spring ActionScript 0.7 - 2009