1 package Analysis.Pointer;
4 public class MySet<T> extends AbstractSet<T> {
7 public MySet(boolean locked) {
9 map=new HashMap<T,T>();
13 map=new HashMap<T,T>();
17 map=new HashMap<T,T>();
21 public MySet(MySet base) {
22 map=new HashMap<T,T>();
35 public boolean remove(Object obj) {
38 return map.remove(obj)!=null;
41 public boolean add(T obj) {
44 boolean retval=map.remove(obj)==null;
49 public boolean contains(Object obj) {
50 return map.containsKey(obj);
53 public boolean removeAll(Collection c) {
55 return super.removeAll(c);
60 public boolean addAll(Collection c) {
62 return super.addAll(c);
71 public boolean isEmpty() {
75 public Iterator<T> iterator() {
76 return map.keySet().iterator();
79 public Object clone() {
80 MySet<T> cl=new MySet<T>();
81 cl.map.putAll(this.map);