JAL-2613 Unit tests and a fix. Phew.
[jalview.git] / src / jalview / datamodel / SequenceI.java
index aec68ab..12ddf60 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.datamodel;
 
+import java.util.BitSet;
 import java.util.List;
 import java.util.Vector;
 
@@ -189,12 +190,13 @@ public interface SequenceI extends ASequenceI
   public int findIndex(int pos);
 
   /**
-   * Returns the sequence position for an alignment position
+   * Returns the sequence position for an alignment position.
    * 
    * @param i
    *          column index in alignment (from 0..<length)
    * 
-   * @return residue number for residue (left of and) nearest ith column
+   * @return TODO: JAL-2562 - residue number for residue (left of and) nearest
+   *         ith column
    */
   public int findPosition(int i);
 
@@ -337,7 +339,14 @@ public interface SequenceI extends ASequenceI
    */
   public void addDBRef(DBRefEntry entry);
 
-  public void addSequenceFeature(SequenceFeature sf);
+  /**
+   * Adds the given sequence feature and returns true, or returns false if it is
+   * already present on the sequence
+   * 
+   * @param sf
+   * @return
+   */
+  public boolean addSequenceFeature(SequenceFeature sf);
 
   public void deleteFeature(SequenceFeature sf);
 
@@ -468,4 +477,11 @@ public interface SequenceI extends ASequenceI
    *         list
    */
   public List<DBRefEntry> getPrimaryDBRefs();
+
+  /**
+   * 
+   * @return BitSet corresponding to index [0,length) where Comparison.isGap()
+   *         returns true.
+   */
+  BitSet getInsertionsAsBits();
 }