JAL-1636 typed collections now in ResidueProperties
[jalview.git] / src / jalview / ext / jmol / JalviewJmolBinding.java
index 921e521..30998bd 100644 (file)
@@ -46,7 +46,6 @@ import java.awt.event.ComponentListener;
 import java.io.File;
 import java.net.URL;
 import java.security.AccessControlException;
-import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
@@ -1400,17 +1399,15 @@ public abstract class JalviewJmolBinding extends SequenceStructureBindingModel i
       return;
     }
 
-    String res;
     int index;
     Color col;
     jmolHistory(false);
     // TODO: Switch between nucleotide or aa selection expressions
-    Enumeration en = ResidueProperties.aa3Hash.keys();
-    StringBuffer command = new StringBuffer("select *;color white;");
-    while (en.hasMoreElements())
+    StringBuilder command = new StringBuilder(128);
+    command.append("select *;color white;");
+    for (String res : ResidueProperties.aa3Hash.keySet())
     {
-      res = en.nextElement().toString();
-      index = ((Integer) ResidueProperties.aa3Hash.get(res)).intValue();
+      index = ResidueProperties.aa3Hash.get(res).intValue();
       if (index > 20)
       {
         continue;