public class FilteringTreeReader extends java.lang.Object implements TreeReader
FilteringTreeReader
filters the output of another TreeReader.
It applies a Filter<Tree> to each returned tree and only returns trees
that are accepted by the Filter. The Filter should accept trees that it
wants returned.Constructor and Description |
---|
FilteringTreeReader(TreeReader tr,
Filter<Tree> f) |
public FilteringTreeReader(TreeReader tr, Filter<Tree> f)
public Tree readTree() throws java.io.IOException
readTree
in interface TreeReader
null
at end of file.java.io.IOException
- If I/O problempublic void close() throws java.io.IOException
TreeReader
.close
in interface TreeReader
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException