Merge commit 'ab43013b7e357b84b4abade0dba949668dfb2a0e' into develop
[jalview.git] / src / jalview / datamodel / CigarArray.java
index a45efcd..e578f0b 100644 (file)
@@ -1,24 +1,26 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
  *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
  * PURPOSE.  See the GNU General Public License for more details.
  * 
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.datamodel;
 
-import java.util.Vector;
+import java.util.List;
 
 public class CigarArray extends CigarBase
 {
@@ -146,25 +148,25 @@ public class CigarArray extends CigarBase
    * internal constructor function - called by CigarArray(AlignmentI, ...);
    * 
    * @param alignment
-   * @param columnSelection
+   * @param list
    *          - vector of visible regions as returned from
    *          columnSelection.getHiddenColumns()
    * @param selectionGroup
    */
   private void constructFromAlignment(AlignmentI alignment,
-          Vector columnSelection, SequenceGroup selectionGroup)
+          List<int[]> list, SequenceGroup selectionGroup)
   {
     int[] _startend = _calcStartEndBounds(alignment, selectionGroup);
     int start = _startend[1], end = _startend[2];
     // now construct the CigarArray operations
-    if (columnSelection != null)
+    if (list != null)
     {
       int[] region;
       int hideStart, hideEnd;
       int last = start;
-      for (int j = 0; last < end & j < columnSelection.size(); j++)
+      for (int j = 0; last < end & j < list.size(); j++)
       {
-        region = (int[]) columnSelection.elementAt(j);
+        region = list.get(j);
         hideStart = region[0];
         hideEnd = region[1];
         // edit hidden regions to selection range