01: // Copyright (c) 2000, 2001 Per M.A. Bothner and Brainfood Inc.
02: // This is free software; for terms and warranty disclaimer see ./COPYING.
03:
04: package gnu.lists;
05:
06: /** A Consumer that does nothing. */
07:
08: public class VoidConsumer extends FilterConsumer {
09: public static VoidConsumer instance = new VoidConsumer();
10:
11: public static VoidConsumer getInstance() {
12: return instance;
13: }
14:
15: public VoidConsumer() {
16: super (null);
17: skipping = true;
18: }
19:
20: /** True if consumer is ignoring rest of element.
21: * The producer can use this information to skip ahead. */
22: public boolean ignoring() {
23: return true;
24: }
25: }
|