|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jebl.evolution.io.NewickImporter
public class NewickImporter
Constructor Summary | |
---|---|
NewickImporter(Reader reader,
boolean unquotedLabels)
Constructor |
Method Summary | |
---|---|
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 |
List<Tree> |
importTrees()
Import all the trees |
Iterator<Tree> |
iterator()
Returns an iterator over a set of elements of type T. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NewickImporter(Reader reader, boolean unquotedLabels)
reader
- tree textunquotedLabels
- if true, try to read unqouted lables containing spacesMethod Detail |
---|
public Iterator<Tree> iterator()
iterator
in interface Iterable<Tree>
public boolean hasTree() throws IOException, ImportException
TreeImporter
List trees = new ArrayList();
while (hasTree()) {
trees.add(importNextTree());
}
return whether another tree is available.
hasTree
in interface TreeImporter
IOException
ImportException
public Tree importNextTree() throws IOException, ImportException
TreeImporter
importNextTree
in interface TreeImporter
IOException
ImportException
public List<Tree> importTrees() throws IOException, ImportException
TreeImporter
importTrees
in interface TreeImporter
IOException
ImportException
- Any type of tree is fine.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |