KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > validate > mns > Hashset


1 package com.thaiopensource.validate.mns;
2
3 import java.util.Hashtable JavaDoc;
4
5 class Hashset {
6   private final Hashtable JavaDoc table = new Hashtable JavaDoc();
7
8   boolean contains(Object JavaDoc key) {
9     return table.get(key) != null;
10   }
11
12   void add(Object JavaDoc key) {
13     table.put(key, key);
14   }
15
16   void clear() {
17     table.clear();
18   }
19 }
20
Popular Tags