JAL-2388 Alignment col and row collections with iterators
[jalview.git] / src / jalview / datamodel / AllColsCollection.java
  */
 package jalview.datamodel;
 
+import jalview.api.AlignmentColsCollectionI;
+
 import java.util.Iterator;
 
-public class AlignmentColsCollection implements Iterable<Integer>
+public class AllColsCollection implements AlignmentColsCollectionI
 {
   int start;
   int end;
   ColumnSelection hidden;
   
-  public AlignmentColsCollection(int s, int e, ColumnSelection colsel)
+  public AllColsCollection(int s, int e, ColumnSelection colsel)
   {
     start = s;
     end = e;
@@ -40,10 +42,8 @@ public class AlignmentColsCollection implements Iterable<Integer>
   {
     return new AllColsIterator(start,end,hidden);
   }
-  
-  /**
-   * Answers if the column at the the current position is hidden.
-   */
+
+  @Override
   public boolean isHidden(int c)
   {
     return !hidden.isVisible(c);