| Package | de.polygonal.ds |
| Interface | public interface Collection |
| Implementors | Array2, Array3, ArrayedQueue, ArrayedStack, BinarySearchTree, DLinkedList, Graph, HashMap, HashTable, Heap, LinkedQueue, LinkedStack, PriorityQueue, SLinkedList, Set, TreeNode |
| Property | Defined By | ||
|---|---|---|---|
| size : int [read-only]
The total number of items. | Collection | ||
| Method | Defined By | ||
|---|---|---|---|
clear():void
Clears all items. | Collection | ||
contains(obj:*):Boolean
Determines if the collection contains a given item. | Collection | ||
Initializes an iterator object pointing to the first item in the
collection. | Collection | ||
isEmpty():Boolean
Checks if the collection is empty. | Collection | ||
toArray():Array
Converts the collection into an array. | Collection | ||
| size | property |
size:int [read-only] The total number of items.
public function get size():int| clear | () | method |
public function clear():voidClears all items.
| contains | () | method |
public function contains(obj:*):BooleanDetermines if the collection contains a given item.
Parameters
obj:* — The item to search for.
|
Boolean — True if the item exists, otherwise false.
|
| getIterator | () | method |
public function getIterator():IteratorInitializes an iterator object pointing to the first item in the collection.
ReturnsIterator — An iterator object.
|
| isEmpty | () | method |
public function isEmpty():BooleanChecks if the collection is empty.
ReturnsBoolean — True if empty, otherwise false.
|
| toArray | () | method |
public function toArray():ArrayConverts the collection into an array.
ReturnsArray — An array.
|