JAL-1114 - refactor methods handling Vectors and Hashtables to Lists and Maps, and...
[jalview.git] / src / jalview / datamodel / HiddenSequences.java
index 9c3b8e0..7914d3d 100755 (executable)
@@ -140,14 +140,14 @@ public class HiddenSequences
     alignment.deleteSequence(sequence);
   }
 
-  public Vector showAll(Hashtable hiddenReps)
+  public Vector showAll(Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
   {
     Vector revealedSeqs = new Vector();
     for (int i = 0; i < hiddenSequences.length; i++)
     {
       if (hiddenSequences[i] != null)
       {
-        Vector tmp = showSequence(i, hiddenReps);
+        Vector tmp = showSequence(i, hiddenRepSequences);
         for (int t = 0; t < tmp.size(); t++)
         {
           revealedSeqs.addElement(tmp.elementAt(t));
@@ -157,14 +157,14 @@ public class HiddenSequences
     return revealedSeqs;
   }
 
-  public Vector showSequence(int alignmentIndex, Hashtable hiddenReps)
+  public Vector showSequence(int alignmentIndex, Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
   {
     Vector revealedSeqs = new Vector();
     SequenceI repSequence = alignment.getSequenceAt(alignmentIndex);
-    if (repSequence != null && hiddenReps != null
-            && hiddenReps.containsKey(repSequence))
+    if (repSequence != null && hiddenRepSequences != null
+            && hiddenRepSequences.containsKey(repSequence))
     {
-      hiddenReps.remove(repSequence);
+      hiddenRepSequences.remove(repSequence);
       revealedSeqs.addElement(repSequence);
     }