Packageorg.springextensions.actionscript.domain
Classpublic class Enum
ImplementsIEquals

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



Public Properties
 PropertyDefined by
  name : String
Returns the name of this enum.
Enum
Public Methods
 MethodDefined by
  
Enum(name:String = "")
Creates a new Enum object.
Enum
  
equals(other:Object):Boolean
Checks if this enum is equal to the other passed in enum.
Enum
  
forName(name:String, clazz:Class):Enum
[static] Returns the enum entry for the given class by its name.
Enum
  
toString():String
Returns a string representation of this enum.
Enum
Property detail
nameproperty
name:String  [read-write]

Returns the name of this enum.

Implementation
    public function get name():String
    public function set name(value:String):void
Constructor detail
Enum()constructor
public function Enum(name:String = "")

Creates a new Enum object.

Parameters
name:String (default = "") — the name of the enum value
Method detail
equals()method
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
forName()method 
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
Enum
toString()method 
public function toString():String

Returns a string representation of this enum.

Returns
String