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 boolean
hasTree()
This can be used to read one tree at a time in a loop:List
return whether another tree is available.trees = new ArrayList (); while (hasTree()) { trees.add(importNextTree()); } Tree
importNextTree()
Import a single treejava.util.List<Tree>
importTrees()
Import all the trees
-
-
-
Method Detail
-
hasTree
boolean hasTree() throws java.io.IOException, ImportException
This can be used to read one tree at a time in a loop:List
return whether another tree is available.trees = new ArrayList (); while (hasTree()) { trees.add(importNextTree()); } - Throws:
java.io.IOException
ImportException
-
importNextTree
Tree importNextTree() throws java.io.IOException, ImportException
Import a single tree- Returns:
- the tree
- Throws:
java.io.IOException
ImportException
-
importTrees
java.util.List<Tree> importTrees() throws java.io.IOException, ImportException
Import all the trees- Returns:
- the list of trees
- Throws:
java.io.IOException
ImportException
- Any type of tree is fine.
-
-