@Override public boolean add(K k) { if (k == null) throw new NullPointerException(); boolean retVal = !bitSet.get(k.getOrdinal()); if (retVal) { bitSet.set(k.getOrdinal()); size++; } return retVal; }
@Override public boolean remove(Object o) { if (o == null) return false; K k = (K) o; boolean retVal = bitSet.get(k.getOrdinal()); if (retVal) { bitSet.set(k.getOrdinal(), false); size--; } return retVal; }
@Override public boolean contains(Object o) { K k = (K) o; return k != null && bitSet.get(k.getOrdinal()); }