Package pal.alignment

Class AlignmentBuilder


  • public class AlignmentBuilder
    extends java.lang.Object
    A class for the gradual construction of an alignment. To supersede simular classes hidden away in PAL History
    • 25/11/2003 - Created
    Version:
    $Id: AlignmentBuilder.java,v 1.1 2003/11/25 01:06:21 matt Exp $
    Author:
    Matthew Goode
    • Constructor Summary

      Constructors 
      Constructor Description
      AlignmentBuilder​(int initialCapacity)
      The constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSequence​(int[] states, java.lang.String name)
      Add sequence data to store
      void clearAll()
      Remove all currently stored sequences.
      Alignment generateAlignment​(DataType dt)
      Build an alignment based on sequences stored.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AlignmentBuilder

        public AlignmentBuilder​(int initialCapacity)
        The constructor
        Parameters:
        initialCapacity - The initial amount of space to allocate for sequence storage (dynamically adjusts if number of sequences exceeds capacity)
    • Method Detail

      • clearAll

        public void clearAll()
        Remove all currently stored sequences.
      • generateAlignment

        public Alignment generateAlignment​(DataType dt)
        Build an alignment based on sequences stored.
        Parameters:
        dt - The datatype of the sequence data
        Returns:
        The generated alignment
      • addSequence

        public void addSequence​(int[] states,
                                java.lang.String name)
        Add sequence data to store
        Parameters:
        states - The states of the sequence (builder assumes all state arrays are equal length)
        name - The name of the sequence