jfun.parsec

Interface Accumulator<From,To>

public interface Accumulator<From,To> extends Serializable

Used to accumulate objects. Parsers.manyAccum() use Accumulator to collect return values. Can be parameterized as Accumulator

Author: Ben Yu 2004-11-12

Method Summary
voidaccumulate(From obj)
accumulate one object into the result.
TogetResult()
gets the accumulated result.

Method Detail

accumulate

public void accumulate(From obj)
accumulate one object into the result.

Parameters: obj the object to be accumulated.

getResult

public To getResult()
gets the accumulated result.

Returns: the result.