GODPAPER | All Packages | All Classes | Index | Frames No Frames |
PGNToken

Package | com.godpaper.as3.serialization
Class | public final class PGNToken
Inheritance | PGNToken Object

PGNToken.as class.

Public Properties

| Property | Defined By
--- | --- | ---
|  | type : int The type of the token. | PGNToken
|  | value : Object The value of the token | PGNToken

Public Methods

| Method | Defined By
--- | --- | ---
|  | PGNToken(type:int = -1, value:Object = null) Creates a new PGNToken with a specific token type and value. | PGNToken
|  | create(type:int = -1, value:Object = null):PGNToken [static] Factory method to create instances. | PGNToken

Public Constants

| Constant | Defined By
--- | --- | ---
|  | token : PGNToken [static] Reusable token instance. | PGNToken

Property Detail

type | property

`public var type:int`

Language Version : | ActionScript 3.0

Runtime Versions : | AIR 1.0, Flash Player 9.0

The type of the token.

value | property |

`public var value:Object`

Language Version : | ActionScript 3.0

Runtime Versions : | AIR 1.0, Flash Player 9.0

The value of the token

Constructor Detail

PGNToken | () | Constructor

`public function PGNToken(type:int = -1, value:Object = null)`

Language Version : | ActionScript 3.0

Runtime Versions : | AIR 1.0, Flash Player 9.0

Creates a new PGNToken with a specific token type and value.

Parameters

| `type:int` (default = `-1`)`` — The PGNTokenType of the token
| `value:Object` (default = `null`)`` — The value of the token

Method Detail

create | () | method

`public static function create(type:int = -1, value:Object = null):PGNToken`

Factory method to create instances. Because we don't need more than one instance of a token at a time, we can always use the same instance to improve performance and reduce memory consumption during decoding.

Parameters

| `type:int` (default = `-1`)``
| `value:Object` (default = `null`)``

Returns

| `PGNToken`

Constant Detail

token | Constant

`public static const token:PGNToken`

Reusable token instance.

See also

create()

Thu Jan 16 2014, 01:11 PM +08:00