changes to build script to increase java heap memory
[IRC.git] / Robust / src / ClassLibrary / HashSet.java
1 public class HashSet {
2     HashMap map;
3     HashSet() {
4         map=new HashMap();
5     }
6     HashSet(int initialCapacity) {
7         map=new HashMap(initialCapacity);
8     }
9     HashSet(int initialCapacity, float loadFactor) {
10         map=new HashMap(initialCapacity, loadFactor);
11     }
12     public boolean add(Object o) {
13         return (map.put(o, this)==null);
14     }
15     public boolean remove(Object o) {
16         return (map.remove(o)!=null);
17     }
18     public boolean isEmpty() {
19         return map.isEmpty();
20     }
21     public boolean contains(Object o) {
22         return map.containsKey(o);
23     }
24     public int size() {
25         return map.size();
26     }
27     public HashMapIterator iterator() {
28         return map.iterator(0);
29     }
30 }