예제 #1
0
 @Override
 public boolean add(T o) {
   final int hash = hasher.getHashCode(o);
   if (!map.containsKey(hash)) {
     map.put(hash, o);
     super.add(o);
     return true;
   } else {
     return false;
   }
 }
예제 #2
0
 @Override
 public boolean remove(Object o) {
   final int hash = hasher.getHashCode(o);
   if (map.containsKey(hash)) {
     super.remove(map.get(hash));
     map.remove(hash);
     return true;
   } else {
     return false;
   }
 }
예제 #3
0
 @Override
 public boolean contains(Object o) {
   return map.containsKey(hasher.getHashCode(o));
 }