saker.util Documentation TaskDoc JavaDoc Packages
package saker.util
public interface ElementAccumulator<Eextends Iterable<E>
Interface for simple container classes that allow elements to be added (accumulated) to it.

Implemetations of this interface allow elements of a given type to be added to them, and later iterated over them. The actual nature of the additions, or other restrictions are implementation dependent.

This interface doesn't specify requirements regarding to thread safety, algorithmic complexity of the additions or iteration order and behaviour.

Addition methods may throw implementation specific runtime exceptions if they cannot fulfil the request. E.g. no more pre-allocated storage available, or requirements regarding the argument is violated.

EThe element type.
Methods
public void
add(E element)
Adds an element to the accumulator.
public int
Gets the current number of accumulated elements in this accumulator.
Inherited methods
From: Iterable<E>
public abstract void add(E element)
Adds an element to the accumulator.
elementThe element to add.
public abstract int size()
Gets the current number of accumulated elements in this accumulator.
The number of elements present.