com.varankin.io.container
Interface Accumulator<Atom>

Type Parameters:
Atom - elementary object described by syntax.
All Superinterfaces:
Receiver<Atom>
All Known Implementing Classes:
SyntaxImpl

public interface Accumulator<Atom>
extends Receiver<Atom>

Mutable object to accept another objects of specified type. It contains history of inserted objects, so called "tail".

Author:
© 2010 Nikolai Varankine

Method Summary
 java.util.List<Atom> tail()
           
 boolean tail(Atom aAtom)
          Adds next elementary object to the end of tail.
 boolean valid()
           
 
Methods inherited from interface com.varankin.io.container.Receiver
add
 

Method Detail

tail

boolean tail(Atom aAtom)
Adds next elementary object to the end of tail.

Parameters:
aAtom - elementary object to add.
Returns:
true if object was added and false otherwise.

tail

java.util.List<Atom> tail()
Returns:
current sequence of elementary objects in the tail; any update to returned list affects the tail.

valid

boolean valid()
Returns:
true if Receiver stands in a good shape and false otherwise.