gnu.lists
Class FilterConsumer

java.lang.Object
  extended by gnu.lists.FilterConsumer
All Implemented Interfaces:
Consumer, java.lang.Appendable
Direct Known Subclasses:
HttpPrinter, NamedChildrenFilter, OrderedTuples, VoidConsumer

public class FilterConsumer
extends java.lang.Object
implements Consumer

A Consumer that wraps some other Consumer.


Field Summary
protected  Consumer base
           
protected  boolean skipping
           
 
Constructor Summary
FilterConsumer(Consumer base)
           
 
Method Summary
 Consumer append(char c)
           
 Consumer append(java.lang.CharSequence csq)
           
 Consumer append(java.lang.CharSequence csq, int start, int end)
           
 void beginAttribute(java.lang.String attrName, java.lang.Object attrType)
          Write a attribute for the current group.
 void beginDocument()
           
 void beginGroup(java.lang.String typeName, java.lang.Object type)
           
 void endAttribute()
           
 void endDocument()
           
 void endGroup(java.lang.String typeName)
           
 boolean ignoring()
          True if consumer is ignoring rest of group.
 void write(char[] buf, int off, int len)
           
 void writeBoolean(boolean v)
           
 void writeChar(int v)
           
 void writeChars(java.lang.String str)
           
 void writeDouble(double v)
           
 void writeFloat(float v)
           
 void writeInt(int v)
           
 void writeLong(long v)
           
 void writeObject(java.lang.Object v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base

protected Consumer base

skipping

protected boolean skipping
Constructor Detail

FilterConsumer

public FilterConsumer(Consumer base)
Method Detail

writeChar

public void writeChar(int v)
Specified by:
writeChar in interface Consumer

writeBoolean

public void writeBoolean(boolean v)
Specified by:
writeBoolean in interface Consumer

writeFloat

public void writeFloat(float v)
Specified by:
writeFloat in interface Consumer

writeDouble

public void writeDouble(double v)
Specified by:
writeDouble in interface Consumer

writeInt

public void writeInt(int v)
Specified by:
writeInt in interface Consumer

writeLong

public void writeLong(long v)
Specified by:
writeLong in interface Consumer

beginDocument

public void beginDocument()
Specified by:
beginDocument in interface Consumer

endDocument

public void endDocument()
Specified by:
endDocument in interface Consumer

beginGroup

public void beginGroup(java.lang.String typeName,
                       java.lang.Object type)
Specified by:
beginGroup in interface Consumer

endGroup

public void endGroup(java.lang.String typeName)
Specified by:
endGroup in interface Consumer

beginAttribute

public void beginAttribute(java.lang.String attrName,
                           java.lang.Object attrType)
Description copied from interface: Consumer
Write a attribute for the current group. This is only allowed immediately after a beginGroup.

Specified by:
beginAttribute in interface Consumer

endAttribute

public void endAttribute()
Specified by:
endAttribute in interface Consumer

writeObject

public void writeObject(java.lang.Object v)
Specified by:
writeObject in interface Consumer

ignoring

public boolean ignoring()
Description copied from interface: Consumer
True if consumer is ignoring rest of group. The producer can use this information to skip ahead.

Specified by:
ignoring in interface Consumer

writeChars

public void writeChars(java.lang.String str)
Specified by:
writeChars in interface Consumer

write

public void write(char[] buf,
                  int off,
                  int len)
Specified by:
write in interface Consumer

append

public Consumer append(char c)
Specified by:
append in interface Consumer
Specified by:
append in interface java.lang.Appendable

append

public Consumer append(java.lang.CharSequence csq)
Specified by:
append in interface Consumer
Specified by:
append in interface java.lang.Appendable

append

public Consumer append(java.lang.CharSequence csq,
                       int start,
                       int end)
Specified by:
append in interface Consumer
Specified by:
append in interface java.lang.Appendable