JAL-2629 add documentation to previous work
[jalview.git] / src / jalview / datamodel / Alignment.java
index 38d0092..abbd8e3 100755 (executable)
@@ -289,6 +289,32 @@ public class Alignment implements AlignmentI
   }
 
   /**
+   * Inserts a sequence at a point in the alignment.
+   * 
+   * @param i
+   *          the index of the position the sequence is to be inserted in.
+   */
+  @Override
+  public void insertSequenceAt(int i, SequenceI snew)
+  {
+    synchronized (sequences)
+    {
+      if (sequences.size() > i)
+      {
+        sequences.add(i, snew);
+        return;
+
+      }
+      else
+      {
+        sequences.add(snew);
+        hiddenSequences.adjustHeightSequenceAdded();
+      }
+      return;
+    }
+  }
+
+  /**
    * DOCUMENT ME!
    * 
    * @return DOCUMENT ME!
@@ -1960,7 +1986,11 @@ public class Alignment implements AlignmentI
     hiddenCols = cols;
   }
 
-
+  /**
+   * Returns all HMM consensus sequences. This will not return real sequences
+   * with HMMs. If remove is set to true, the consensus sequences will be
+   * removed from the alignment.
+   */
   @Override
   public List<SequenceI> getHMMConsensusSequences(boolean remove)
   {
@@ -1998,7 +2028,4 @@ public class Alignment implements AlignmentI
     }
     return seqs;
   }
-
-
-
 }