public class SpaceReducer extends BufferedReaderTransformer implements CharTransformer
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SpaceReducer.SpaceReducerStatus |
protected static class |
SpaceReducer.Tag
this is a helper class that can check if a tag was opened or closed in a line of text
It first removes all bodyless versions of the tag from the line, and then counts all opening and
closing occurrences of the tag.
|
BufferedReaderTransformer.Status| Constructor and Description |
|---|
SpaceReducer() |
| Modifier and Type | Method and Description |
|---|---|
BufferedReaderTransformer.Status |
createNewStatus() |
String |
toString() |
protected boolean |
transform(PrintWriter bw,
String line,
BufferedReaderTransformer.Status status) |
protected Writer |
transform2(Reader r,
Writer w)
This was the original, now unused implementation (not efficient enough)
|
protected String |
transform2(String r) |
transformtransform, transform, transformBack, transformBack, transformBackclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittransform, transform, transform, transformBack, transformBack, transformBackprotected boolean transform(PrintWriter bw, String line, BufferedReaderTransformer.Status status)
transform in class BufferedReaderTransformerbw - the writer to direct the output toline - the inputstatus - this object could hold transformation status information. Or nulltrue when line is transformedprotected Writer transform2(Reader r, Writer w)
public String toString()
toString in interface TransformertoString in class Objectpublic BufferedReaderTransformer.Status createNewStatus()
createNewStatus in class BufferedReaderTransformerMMBase 1.9-SNAPSHOT - ${javadoctimestamp}