JsDoc: data-structure.js

Library: data-structure.js
Overview
No overview provided.
Constructors
SimileAjax.Set(a)
A basic set (in the mathematical sense) data structure
parameters

Array or SimileAjax.Set | a | an initial collection

methods

- add

- addSet

- remove

- removeSet

- retainSet

- contains

- size

- toArray

- visit

SimileAjax.SortedArray(compare, initialArray)
A sorted array data structure
parameters

| compare |
| initialArray |

Functions
SimileAjax.Set.add(o)
Adds the given object to this set, assuming there it does not already exist
parameters

Object | o | the object to add

returns

Boolean | true if the object was added, false if not

SimileAjax.Set.addSet(set)
Adds each element in the given set to this set
parameters

SimileAjax.Set | set | the set of elements to add

SimileAjax.Set.remove(o)
Removes the given element from this set
parameters

Object | o | the object to remove

returns

Boolean | true if the object was successfully removed, false otherwise

SimileAjax.Set.removeSet(set)
Removes the elements in this set that correspond to the elements in the given set
parameters

SimileAjax.Set | set | the set of elements to remove

SimileAjax.Set.retainSet(set)
Removes all elements in this set that are not present in the given set, i.e. modifies this set to the intersection of the two sets
parameters

SimileAjax.Set | set | the set to intersect

SimileAjax.Set.contains(o)
Returns whether or not the given element exists in this set
parameters

SimileAjax.Set | o | the object to test for

returns

Boolean | true if the object is present, false otherwise

SimileAjax.Set.size()
Returns the number of elements in this set
returns

Number | the number of elements in this set

SimileAjax.Set.toArray()
Returns the elements of this set as an array
returns

Array | a new array containing the elements of this set

SimileAjax.Set.visit(f)
Iterates through the elements of this set, order unspecified, executing the given function on each element until the function returns true
parameters

Function | f | a function of form f(element)

Objects
Generated by JsDoc Toolkit on Tue, 07 Aug 2007 20:53:47 GMT