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 trees = new ArrayList(); while (hasTree()) { trees.add(importNextTree()); } return whether another tree is available.
      Tree importNextTree()
      Import a single tree
      java.util.List<Tree> importTrees()
      Import all the trees
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
    • 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 trees = new ArrayList(); while (hasTree()) { trees.add(importNextTree()); } return whether another tree is available.
        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.