Package | com.threerings.util |
Class | public class ByteEnum |
Inheritance | ByteEnum ![]() |
Property | Defined by | ||
---|---|---|---|
_code : int The byte value of this ByteEnum.
| ByteEnum | ||
![]() | _name : String The String name of this enum value.
| Enum |
Method | Defined by | ||
---|---|---|---|
ByteEnum(name:String, code:int)
Call this constructor from your subclass' constructor.
| ByteEnum | ||
![]() |
compareTo(other:Object):int
| Enum | |
![]() |
equals(other:Object):Boolean
| Enum | |
[static]
Returns the enum value with the specified code in the supplied enum class.
| ByteEnum | ||
![]() |
hashCode():int
| Enum | |
![]() |
name():String
Get the name of this enum.
| Enum | |
![]() |
ordinal():int
Get the ordinal of this enum.
| Enum | |
toByte():int
Return the byte form of this enum.
| ByteEnum | ||
![]() |
toString():String
Return the String representation of this enum.
| Enum | |
![]() |
valueOf():Object
Return the primitive value of this Object.
| Enum | |
![]() |
values(clazz:Class):Array
[static]
Get all the enums of the specified class, or null if it's not an enum.
| Enum |
_code | property |
protected var _code:int
The byte value of this ByteEnum.
ByteEnum | () | constructor |
public function ByteEnum(name:String, code:int)
Call this constructor from your subclass' constructor. Note that we do not verify that you're using a valid byte, or that you haven't assigned two enums to the same byte.
Parametersname:String |
|
code:int |
fromByte | () | method |
public static function fromByte(clazz:Class, code:int):ByteEnum
Returns the enum value with the specified code in the supplied enum class. Throws ArgumentError if the enum lacks a value that maps to the supplied code.
Parametersclazz:Class |
|
code:int |
ByteEnum |
toByte | () | method |
public final function toByte():int
Return the byte form of this enum.
Returnsint |