~ubuntu-branches/ubuntu/utopic/jing-trang/utopic

« back to all changes in this revision

Viewing changes to mod/nvdl/src/main/com/thaiopensource/validate/mns/Hashset.java

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault
  • Date: 2009-09-01 15:53:03 UTC
  • Revision ID: james.westby@ubuntu.com-20090901155303-2kweef05h5v9j3ni
Tags: upstream-20090818
ImportĀ upstreamĀ versionĀ 20090818

Show diffs side-by-side

added added

removed removed

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