JAL-2388 Alignment col and row collections with iterators
[jalview.git] / src / jalview / datamodel / AllRowsCollection.java
  */
 package jalview.datamodel;
 
+import jalview.api.AlignmentRowsCollectionI;
+
 import java.util.Iterator;
 
-public class AlignmentRowsCollection implements Iterable<Integer>
+public class AllRowsCollection implements AlignmentRowsCollectionI
 {
   int start;
 
@@ -32,7 +34,7 @@ public class AlignmentRowsCollection implements Iterable<Integer>
 
   HiddenSequences hidden;
 
-  public AlignmentRowsCollection(int s, int e, AlignmentI al)
+  public AllRowsCollection(int s, int e, AlignmentI al)
   {
     start = s;
     end = e;
@@ -46,14 +48,13 @@ public class AlignmentRowsCollection implements Iterable<Integer>
     return new AllRowsIterator(start, end, alignment);
   }
 
-  /**
-   * Answers if the sequence at the position is hidden.
-   */
+  @Override
   public boolean isHidden(int seq)
   {
     return hidden.isHidden(seq);
   }
 
+  @Override
   public SequenceI getSequence(int seq)
   {
     return alignment.getSequenceAtAbsoluteIndex(seq);