Collection<E> Interface
The Collection interface is the public interface of all collections.
Extends
Subinterfaces
Methods
Code bool every(bool f(E element)) #
Returns true if every elements of this collection satisify the predicate f. Returns false otherwise.
bool every(bool f(E element));
Code Collection<E> filter(bool f(E element)) #
Returns a new collection with the elements of this collection that satisfy the predicate f.
An element satisfies the predicate
f if f(element)
returns true.
Collection<E> filter(bool f(E element));
Code void forEach(void f(E element)) #
Applies the function f to each element of this collection.
void forEach(void f(E element));
Code Collection map(f(E element)) #
Returns a new collection with the elements f(e)
for each element e
of this collection.
Note on typing: the return type of f() could be an arbitrary type and consequently the returned collection's typeis Collection.
Collection map(f(E element));