3 import java.util.Vector;
4 import java.util.Hashtable;
6 public class DBRefUtils
9 * Utilities for handling DBRef objects and their collections.
11 public static Vector selectRefs(java.util.Vector dbrefs, String[] sources) {
16 Hashtable srcs = new Hashtable();
17 Vector res=new Vector();
18 for (int i=0; i<sources.length; i++)
19 srcs.put(new String(sources[i]), new Integer(i));
20 for (int i=0, j=dbrefs.size(); i<j; i++)
21 if (dbrefs.get(i) instanceof jalview.datamodel.DBRefEntry) {
22 jalview.datamodel.DBRefEntry entry = (jalview.datamodel.DBRefEntry) dbrefs.get(i);
23 if (srcs.containsKey(entry.getSource()))
29 // there are probable memory leaks in the hashtable!