* drainStopperMany() will stop cleanly.
* exit state: stop */
public List<BitVector> drainMany(int maxNbItems) {
- prln("begin drainMany. stopper="+name);
adjustIndent(2);
stop();
if (myState==StateWireState.EMPTY || cnt>=maxNbItems) break;
cnt++;
- if (maxNbItems>1)
- indenter.pr(" drainMany: reading word number: "+cnt+
- "/"+(maxNbItems==Integer.MAX_VALUE
- ?"unlimited":(""+maxNbItems))+
- "... ");
+ indenter.pr(" drain"+(maxNbItems==0?"":"Many")+
+ ": reading word"+(maxNbItems==0?":":" number "+cnt+
+ "/"+(maxNbItems==Integer.MAX_VALUE
+ ?"unlimited":("at-most-"+maxNbItems))+": "));
BitVector d = drainNoCheck();
if (maxNbItems>1)
- prln(" done.");
+ prln(" got "+new MarinaPacket(d));
ans.add(d);
}