Package jebl.evolution.io
Interface TreeImporter
- All Known Implementing Classes:
NewickImporter,NexusImporter
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
Modifier and TypeMethodDescriptionbooleanhasTree()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()); } Import a single treeImport all the treesMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
hasTree
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()); } - Throws:
IOExceptionImportException
-
importNextTree
Import a single tree- Returns:
- the tree
- Throws:
IOExceptionImportException
-
importTrees
Import all the trees- Returns:
- the list of trees
- Throws:
IOExceptionImportException- Any type of tree is fine.
-