BiSet

A simple class for storing a set of objects

This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiSet .

Constructor

new BiSet ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
valuesObject[]checkedThis returns an array containing the objects in the set. This is the same as toArray

Methods

NameDescription
addAdds an object to the set. An object can only be available once in a set
clearRemoves all objects from the set
containsChecks whether the set contains the given object
removeRemoves an object from the set.
toArrayThis returns an array containing the objects in the set

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

add

Adds an object to the set. An object can only be available once in a set

Syntax

object.add ( o )

Parameters

NameTypeOptionalDefaultDescripton
oObjectThe object to add

Return Type

void

clear

Removes all objects from the set

Syntax

object.clear ( )

Parameters

No arguments.

Return Type

void

contains

Checks whether the set contains the given object

Syntax

object.contains ( o )

Parameters

NameTypeOptionalDefaultDescripton
oObjectThe object to check for

Return Type

Boolean

remove

Removes an object from the set.

Syntax

object.remove ( o )

Parameters

NameTypeOptionalDefaultDescripton
oObjectThe object to remove

Return Type

void

toArray

This returns an array containing the objects in the set

Syntax

object.toArray ( )

Parameters

No arguments.

Return Type

Object[]