1 26 27 package org.objectweb.openccm.explorer.CosTrading; 28 29 30 import java.util.List ; 31 import java.util.LinkedList ; 32 33 34 import org.omg.CosTrading.Lookup; 35 36 44 public class Queries { 45 46 52 55 protected static List queries; 56 57 60 protected Lookup lookup_; 61 62 68 public Queries(Lookup lookup) 69 { 70 lookup_ = lookup; 71 if (Queries.queries == null) Queries.queries = new LinkedList (); 72 } 73 74 80 86 93 public Lookup 94 getLookup() 95 { 96 return lookup_; 97 } 98 99 104 public Query[] 105 getQueries() 106 { 107 return (Query[])Queries.queries.toArray(new Query[0]); 108 } 109 110 115 public void 116 addQuery(Query q) 117 { 118 Queries.queries.add(q); 119 } 120 121 126 public void 127 removeQuery(Query q) 128 { 129 boolean rmvd = Queries.queries.remove(q); 130 } 131 132 137 public int 138 getSize() 139 { 140 return Queries.queries.size(); 141 } 142 143 146 public void 147 clean() 148 { 149 Queries.queries.clear(); 150 } 151 152 } 153 | Popular Tags |