public interface TreeImporter extends java.lang.Iterable<Tree>
Modifier and Type | Method and Description |
---|---|
boolean |
hasTree()
This can be used to read one tree at a time in a loop:
List
return whether another tree is available. |
Tree |
importNextTree()
Import a single tree
|
java.util.List<Tree> |
importTrees()
Import all the trees
|
boolean hasTree() throws java.io.IOException, ImportException
List trees = new ArrayList();
while (hasTree()) {
trees.add(importNextTree());
}
return whether another tree is available.java.io.IOException
ImportException
Tree importNextTree() throws java.io.IOException, ImportException
java.io.IOException
ImportException
java.util.List<Tree> importTrees() throws java.io.IOException, ImportException
java.io.IOException
ImportException
- Any type of tree is fine.http://code.google.com/p/jebl2/