public interface Producer<R,S>
boolean
hasNext(S state)
S
next(S state)
R
produce(S state)
R produce(S state)
boolean hasNext(S state)
S next(S state)
see also the complete user documentation .