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 TypeMethodDescriptionboolean
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()); } 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:List
return whether another tree is available.trees = new ArrayList (); while (hasTree()) { trees.add(importNextTree()); } - Throws:
IOException
ImportException
-
importNextTree
Import a single tree- Returns:
- the tree
- Throws:
IOException
ImportException
-
importTrees
Import all the trees- Returns:
- the list of trees
- Throws:
IOException
ImportException
- Any type of tree is fine.
-