T
- type of the value producedpublic interface ValueBuilder<T>
Note that all setters should return a boolean
, since the primary
use of this interface is within rules. If the grammar rules are not enough
for validation, you may make the setter return false
to signal a
parsing error.
This is also the base interface used by ListeningParser
to post
events.
ListeningParser.post(ValueBuilder)
boolean reset()
This method is called by ListeningParser.post(ValueBuilder)
after the value has been built. Since it always returns true
, you
may also use it as an action in a parser.
It is the responsibility of the implementations to ensure that the builder is reset to a state so that it is ready to be used again.
true