Merge branch 'develop' into bug/JAL-2510amendFeatures
[jalview.git] / src / jalview / datamodel / VisibleColsCollection.java
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
-package jalview.api.analysis;
+package jalview.datamodel;
 
-import jalview.api.AlignmentViewPanel;
+import jalview.api.AlignmentColsCollectionI;
 
-public interface ViewBasedAnalysisI
+import java.util.Iterator;
+
+public class VisibleColsCollection implements AlignmentColsCollectionI
 {
+  int start;
+  int end;
+
+  HiddenColumns hidden;
+
+  public VisibleColsCollection(int s, int e, AlignmentI al)
+  {
+    start = s;
+    end = e;
+    hidden = al.getHiddenColumns();
+  }
 
-  /**
-   * Parameterise the analysis model using the current view
-   * 
-   * @param view
-   * @return true if model is applicable and calculation should proceed
-   */
+  @Override
+  public Iterator<Integer> iterator()
+  {
+    return new VisibleColsIterator(start, end, hidden);
+  }
 
-  boolean configureFromAlignmentView(AlignmentViewPanel view);
+  @Override
+  public boolean isHidden(int c)
+  {
+    return false;
+  }
 
 }