FastIDSet implements Serializable, Cloneable, Iterable<Long> { public void clear() { numEntries = 0; numSlotsUsed = 0; Arrays.fill(keys, NULL); } FastIDSet();  FastIDSet(long[] initialKeys);  FastIDSet(int size); int size(); boolean isEmpty(); boolean contains(long key); boolean add(long key); @Override LongPrimitiveIterator iterator(); long[] toArray(); boolean remove(long key); boolean addAll(long[] c); boolean addAll(FastIDSet c); boolean removeAll(long[] c); boolean removeAll(FastIDSet c); boolean retainAll(FastIDSet c); void clear(); void rehash(); int intersectionSize(FastIDSet other); @Override FastIDSet clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString();  }
@Test public void testClear() { FastIDSet set = new FastIDSet(); set.add(1); set.clear(); assertEquals(0, set.size()); assertTrue(set.isEmpty()); assertFalse(set.contains(1)); }