(Name name, int type)
| 286 | } |
| 287 | |
| 288 | private synchronized void |
| 289 | removeElement(Name name, int type) { |
| 290 | Object types = data.get(name); |
| 291 | if (types == null) { |
| 292 | return; |
| 293 | } |
| 294 | if (types instanceof List) { |
| 295 | List list = (List) types; |
| 296 | for (int i = 0; i < list.size(); i++) { |
| 297 | Element elt = (Element) list.get(i); |
| 298 | if (elt.getType() == type) { |
| 299 | list.remove(i); |
| 300 | if (list.size() == 0) |
| 301 | data.remove(name); |
| 302 | return; |
| 303 | } |
| 304 | } |
| 305 | } else { |
| 306 | Element elt = (Element) types; |
| 307 | if (elt.getType() != type) |
| 308 | return; |
| 309 | data.remove(name); |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | /** Empties the Cache. */ |
| 314 | public synchronized void |
no test coverage detected