ShortSet implements Serializable { public void remove(short key) { if (contains(key)) { removeKnownPresent(key); } } ShortSet(int capacity); void add(short key); void addAll(ShortSet that); void addKnownAbsent(short key); void clear(); boolean contains(short key); void copyDataFrom(ShortSet that); @Override boolean equals(Object obj); short get(int i); @Override int hashCode(); void remove(short key); void removeKnownPresent(int key); int size(); @Override String toString(); String toString(CoordinateSystem coords);  }
@Test public void testRemove() { set.add((short)23); set.add((short)99); set.remove((short)23); set.remove((short)40); assertEquals(1, set.size()); assertFalse(set.contains((short)23)); }