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

Package | feathers.core
Class | public class TokenList
Inheritance | TokenList Object

A list of space-delimited tokens.

Public Properties

| Property | Defined By
--- | --- | ---
|  | length : int [read-only] The number of tokens in the list. | TokenList
|  | value : String The tokens formated with space delimiters. | TokenList

Public Methods

| Method | Defined By
--- | --- | ---
|  | TokenList() Constructor. | TokenList
|  | add(name:String):void Adds a token to the list. | TokenList
|  | contains(name:String):Boolean Determines if the specified token is in the list. | TokenList
|  | item(index:int):String Returns the token at the specified index, or null, if there is no token at that index. | TokenList
|  | remove(name:String):void Removes a token from the list, if the token is in the list. | TokenList
|  | toggle(name:String):void The token is added to the list if it doesn't appear in the list, or it is removed from the list if it is already in the list. | TokenList

Property Detail

length | property

`length:int` [read-only]

The number of tokens in the list.

Implementation
`public function get length():int`

value | property |

`value:String`

The tokens formated with space delimiters.

Implementation
`public function get value():String`
`public function set value(value:String):void`
Constructor Detail

TokenList | () | Constructor

`public function TokenList()`

Constructor.

Method Detail

add | () | method

`public function add(name:String):void`

Adds a token to the list. If the token already appears in the list, it will not be added again.

Parameters

| `name:String`

contains | () | method |

`public function contains(name:String):Boolean`

Determines if the specified token is in the list.

Parameters

| `name:String`

Returns

| `Boolean`

item | () | method |

`public function item(index:int):String`

Returns the token at the specified index, or null, if there is no token at that index.

Parameters

| `index:int`

Returns

| `String`

remove | () | method |

`public function remove(name:String):void`

Removes a token from the list, if the token is in the list. If the token doesn't appear in the list, this call does nothing.

Parameters

| `name:String`

toggle | () | method |

`public function toggle(name:String):void`

The token is added to the list if it doesn't appear in the list, or it is removed from the list if it is already in the list.

Parameters

| `name:String`

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