1 18 package org.objectweb.speedo.pobjects.map; 19 20 import java.util.Map ; 21 import java.util.HashMap ; 22 import java.util.Collection ; 23 24 28 public class A { 29 30 private long myId; 31 private Map name2b; 32 33 public A() { 34 name2b = new HashMap (); 35 } 36 37 public A(long myid) { 38 name2b = new HashMap (); 39 this.myId = myid; 40 } 41 42 public void clear() { 43 name2b.clear(); 44 } 45 46 public void add(String name, B b) { 47 name2b.put(name, b); 48 } 49 50 public void remove(String name) { 51 name2b.remove(name); 52 } 53 54 public B getB(String name) { 55 return (B) name2b.get(name); 56 } 57 58 61 public Collection names() { 62 return name2b.keySet(); 63 } 64 } 65 | Popular Tags |