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
| Name | Type | get | set | Descripton |
values | Object[] | ![]() | This returns an array containing the objects in the set. This is the same as toArray |
Methods
| Name | Description |
add | Adds an object to the set. An object can only be available once in a set |
clear | Removes all objects from the set |
contains | Checks whether the set contains the given object |
remove | Removes an object from the set. |
toArray | This 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
| Name | Type | Optional | Default | Descripton |
o | Object | The 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
| Name | Type | Optional | Default | Descripton |
o | Object | The object to check for |
Return Type
Boolean
remove
Removes an object from the set.
Syntax
object.remove ( o ) Parameters
| Name | Type | Optional | Default | Descripton |
o | Object | The 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[]
