JAL-1114 promote start/end attributes to gettable fields of annotatable collections
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 11 Oct 2013 10:44:03 +0000 (11:44 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 11 Oct 2013 10:44:03 +0000 (11:44 +0100)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/SequenceCollectionI.java

index 7b545c4..70663aa 100755 (executable)
@@ -1488,4 +1488,13 @@ public class Alignment implements AlignmentI
      hasRNAStructure = true;
    }
  }
+ @Override
+public int getEndRes()
+{
+  return getWidth()-1;
+}@Override
+public int getStartRes()
+{
+  return 0;
+}
 }
index c5cee01..f0d7284 100644 (file)
@@ -29,4 +29,16 @@ public interface SequenceCollectionI
 
   int getWidth();
 
+  /** 
+  * @return the first column included in this collection. Runs from 0<=i<N_cols
+  */
+  int getStartRes();
+  
+
+  /**
+   * 
+   * @return the last column in this collection. Runs from 0<=i<N_cols
+   */
+  int getEndRes();
+
 }