1 11 package org.eclipse.core.internal.properties; 12 13 22 import java.util.*; 23 24 public class QueryResults { 26 protected HashMap table = new HashMap(10); 27 28 public QueryResults() { 29 super(); 30 } 31 32 protected void add(ResourceName resourceName, Object value) { 33 List properties = getResults(resourceName); 34 if (properties.isEmpty()) 35 table.put(resourceName, properties); 36 if (properties.indexOf(value) == -1) 37 properties.add(value); 38 } 39 40 47 public Enumeration getResourceNames() { 48 return Collections.enumeration(table.keySet()); 49 } 50 51 58 public List getResults(ResourceName resourceName) { 59 List results = (List) table.get(resourceName); 60 if (results == null) 61 results = new ArrayList(10); 62 return results; 63 } 64 } 65 | Popular Tags |