Collection

Undocumented in source.

Members

Functions

add
bool add(E e)

Ensures that this collection contains the specified element (optional operation). Returns <tt>true</tt> if this collection changed as a result of the call. (Returns <tt>false</tt> if this collection does not permit duplicates and already contains the specified element.)<p>

addAll
bool addAll(Collection!E c)

Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)

addAll
bool addAll(E[] c)
Undocumented in source.
clear
void clear()

Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.

contains
bool contains(E o)

Returns <tt>true</tt> if this collection contains the specified element. More formally, returns <tt>true</tt> if and only if this collection contains at least one element <tt>e</tt> such that <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.

containsAll
bool containsAll(Collection!E c)

Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.

isEmpty
bool isEmpty()

Returns <tt>true</tt> if this collection contains no elements.

iterator
InputRange!E iterator()

Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee).

remove
bool remove(E o)

Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element <tt>e</tt> such that <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>, if this collection contains one or more such elements. Returns <tt>true</tt> if this collection contained the specified element (or equivalently, if this collection changed as a result of the call).

removeAll
bool removeAll(Collection!E c)

Removes all of this collection's elements that are also contained in the specified collection (optional operation). After this call returns, this collection will contain no elements in common with the specified collection.

removeIf
bool removeIf(Predicate!E filter)

Removes all of the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller.

retainAll
bool retainAll(Collection!E c)

Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.

size
int size()

Returns the number of elements in this collection. If this collection contains more than <tt>Integer.MAX_VALUE</tt> elements, returns <tt>Integer.MAX_VALUE</tt>.

toArray
E[] toArray()

Returns an array containing all of the elements in this collection. If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

Inherited Members

From IObject

opEquals
bool opEquals(IObject o)
Undocumented in source.
toString
string toString()
Undocumented in source.
toHash
size_t toHash()
Undocumented in source.

Meta