An first in first out implemention of the Collection interface. Order is guaranteed so that the first object that is added to a Queue, is the first object that is returned when the object is queried.
asdk.Queue
class
Method | Description |
addItem( item ) |
Adds the specified item to the end of the Queue. |
addAll( object ) |
Adds all the elements within the array or collection object to the end of the Queue. Returns true if the set is changed and false if the set is unchanged as a result of the call. |
clear() |
Removes all of the items from the Queue. |
containsItem( item ) |
A Boolean value indicating whether the specified item is stored in the Queue. |
containsAllItems( items : Collection ) |
A Boolean value indicating whether all the items within the specified Collection are stored in the Queue. |
getSize() |
Returns the total number of items stored within the Queue |
isEmpty() |
A Boolean value indicating whether the Queue is empty (true) or not (false). |
iterator() |
Returns an iterator that can traverse the items within the Queue |
peek() |
Returns the first item in the Queue without removing it. |
pop() |
Removes the first item in the Queue |
push( item ) |
Adds the specified item to the end of the Queue. |
removeItem( item ) |
Removes the specified item from the Queue. |
removeAllItems( items : Collection ) |
Removes all the items within the collection object from the Queue. Returns true if the set is changed and false if the set is unchanged as a result of the call. |
retainAllItems( items : Collection ) |
Retains all the items within the collection object within the Queue and removes any items not in the collection. Returns true if the set is changed and false if the set is unchanged as a result of the call. |
setComparator( condition ) |
Sets the comparator for the Queue; this allows for customizing how objects are compared by using various
implementations of the asdk.condition.IComparator interface. The default comparator is asdk.condition.ObjectComparator . |
toArray() |
Returns the items within the Queue as an array. |
toString() |
Returns a string representation of the Queue. |