public class NewickImporter extends java.lang.Object implements TreeImporter
| Constructor and Description |
|---|
NewickImporter(java.io.Reader reader,
boolean unquotedLabels)
Constructor
|
| 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
|
java.util.Iterator<Tree> |
iterator()
Returns an iterator over a set of elements of type T.
|
public NewickImporter(java.io.Reader reader,
boolean unquotedLabels)
reader - tree textunquotedLabels - if true, try to read unqouted lables containing spacespublic java.util.Iterator<Tree> iterator()
iterator in interface java.lang.Iterable<Tree>public boolean hasTree()
throws java.io.IOException,
ImportException
TreeImporter
List trees = new ArrayList();
while (hasTree()) {
trees.add(importNextTree());
}
return whether another tree is available.hasTree in interface TreeImporterjava.io.IOExceptionImportExceptionpublic Tree importNextTree() throws java.io.IOException, ImportException
TreeImporterimportNextTree in interface TreeImporterjava.io.IOExceptionImportExceptionpublic java.util.List<Tree> importTrees() throws java.io.IOException, ImportException
TreeImporterimportTrees in interface TreeImporterjava.io.IOExceptionImportException - Any type of tree is fine.http://code.google.com/p/jebl2/