Set

A set is a collection of values, without any particular order and no repeated values.  The value is its own key.

Summary
SetA set is a collection of values, without any particular order and no repeated values.
Functions
SetCreates a new empty set.
getReads an item from the set.
setWrites an item to the set.
removeRemoves an item from the set.
contains@inheritDoc
clear@inheritDoc
getIterator@inheritDoc
Properties
size@inheritDoc
Functions
isEmpty@inheritDoc
toArray@inheritDoc
toStringPrints out a string representing the current object.
dumpPrints out all elements (for debug/demo purposes).

Functions

Set

public function Set()

Creates a new empty set.

get

public function get(obj: *):*

Reads an item from the set.

Parameters

objThe item to retrieve.

Returns

The item matching the obj parameter or null if the item is not part of the set. 

set

public function set(obj: *):void

Writes an item to the set.

Parameters

objThe item to be added to the set. 

remove

public function remove(obj: *):Boolean

Removes an item from the set.

Parameters

param obj The item to remove

Returns

The removed item or null if the item wasn’t contained by the set. 

contains

public function contains(obj: *):Boolean

@inheritDoc

clear

public function clear():void

@inheritDoc

getIterator

public function getIterator():Iterator

@inheritDoc

Properties

size

public function get size():int

@inheritDoc

Functions

isEmpty

public function isEmpty():Boolean

@inheritDoc

toArray

public function toArray():Array

@inheritDoc

toString

public function toString():String

Prints out a string representing the current object.

Returns

A string representing the current object. 

dump

public function dump():String

Prints out all elements (for debug/demo purposes).

Returns

A human-readable representation of the structure. 

A ‘java-style’ collection interface.
public function Set()
Creates a new empty set.
public function get(obj: *):*
Reads an item from the set.
public function set(obj: *):void
Writes an item to the set.
public function remove(obj: *):Boolean
Removes an item from the set.
public function contains(obj: *):Boolean
@inheritDoc
public function clear():void
@inheritDoc
public function getIterator():Iterator
@inheritDoc
public function get size():int
@inheritDoc
public function isEmpty():Boolean
@inheritDoc
public function toArray():Array
@inheritDoc
public function toString():String
Prints out a string representing the current object.
public function dump():String
Prints out all elements (for debug/demo purposes).
Close