Package jebl.evolution.io
Interface TreeImporter
-
- All Superinterfaces:
java.lang.Iterable<Tree>
- All Known Implementing Classes:
NewickImporter,NexusImporter
public interface TreeImporter extends java.lang.Iterable<Tree>
Interface for importers that do trees- Version:
- $Id: TreeImporter.java 301 2006-04-17 15:35:01Z rambaut $
- Author:
- Andrew Rambaut, Alexei Drummond
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasTree()This can be used to read one tree at a time in a loop:Listreturn whether another tree is available.trees = new ArrayList (); while (hasTree()) { trees.add(importNextTree()); } TreeimportNextTree()Import a single treejava.util.List<Tree>importTrees()Import all the trees
-
-
-
Method Detail
-
hasTree
boolean hasTree() throws java.io.IOException, ImportExceptionThis can be used to read one tree at a time in a loop:Listreturn whether another tree is available.trees = new ArrayList (); while (hasTree()) { trees.add(importNextTree()); } - Throws:
java.io.IOExceptionImportException
-
importNextTree
Tree importNextTree() throws java.io.IOException, ImportException
Import a single tree- Returns:
- the tree
- Throws:
java.io.IOExceptionImportException
-
importTrees
java.util.List<Tree> importTrees() throws java.io.IOException, ImportException
Import all the trees- Returns:
- the list of trees
- Throws:
java.io.IOExceptionImportException- Any type of tree is fine.
-
-