1 package Analysis.Pointer;
4 public class MySet<T> extends AbstractSet<T> {
7 map=new HashMap<T,T>();
10 public MySet(MySet base) {
11 map=new HashMap<T,T>();
23 public boolean remove(Object obj) {
24 return map.remove(obj)!=null;
27 public boolean add(T obj) {
28 return map.put(obj, obj)==null;
31 public boolean contains(Object obj) {
32 return map.containsKey(obj);
39 public boolean isEmpty() {
43 public Iterator<T> iterator() {
44 return map.keySet().iterator();
47 public Object clone() {
48 MySet<T> cl=new MySet<T>();
49 cl.map.putAll(this.map);