changes to MGC class library
[IRC.git] / Robust / src / ClassLibrary / HashSet.java
index 265ea23ba834340312481c170ba14130a0f13da8..4e4a1bcbaa4c9811f2b7218d09edab86a5430e12 100644 (file)
@@ -1,30 +1,33 @@
 public class HashSet {
-    HashMap map;
-    HashSet() {
-       map=new HashMap();
-    }
-    HashSet(int initialCapacity) {
-       map=new HashMap(initialCapacity);
-    }
-    HashSet(int initialCapacity, float loadFactor) {
-       map=new HashMap(initialCapacity, loadFactor);
-    }
-    public boolean add(Object o) {
-       return (map.put(o, this)==null);
-    }
-    public boolean remove(Object o) {
-       return (map.remove(o)!=null);
-    }
-    public boolean isEmpty() {
-       return map.isEmpty();
-    }
-    public boolean contains(Object o) {
-       return map.containsKey(o);
-    }
-    public int size() {
-       return map.size();
-    }
-    public HashMapIterator iterator() {
-       return map.iterator(0);
-    }
+  HashMap map;
+  HashSet() {
+    map=new HashMap();
+  }
+  HashSet(int initialCapacity) {
+    map=new HashMap(initialCapacity);
+  }
+  HashSet(int initialCapacity, float loadFactor) {
+    map=new HashMap(initialCapacity, loadFactor);
+  }
+  public boolean add(Object o) {
+    return (map.put(o, this)==null);
+  }
+  public boolean remove(Object o) {
+    return (map.remove(o)!=null);
+  }
+  public boolean isEmpty() {
+    return map.isEmpty();
+  }
+  public void clear() {
+    map.clear();
+  }
+  public boolean contains(Object o) {
+    return map.containsKey(o);
+  }
+  public int size() {
+    return map.size();
+  }
+  public HashMapIterator iterator() {
+    return (HashMapIterator)map.iterator(0);
+  }
 }