@Test public void testIterator() { FastIDSet set = buildTestFastSet(); Collection<Long> expected = Sets.newHashSetWithExpectedSize(3); expected.add(1L); expected.add(2L); expected.add(3L); LongPrimitiveIterator it = set.iterator(); while (it.hasNext()) { expected.remove(it.nextLong()); } assertTrue(expected.isEmpty()); }
@Override public LongPrimitiveIterator iterator() { return new KeyIterator(); }
FastIDSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } }
FastIDSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } FastIDSet();  FastIDSet(long[] initialKeys);  FastIDSet(int size);  FastIDSet(int size, float loadFactor); }
FastIDSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } FastIDSet();  FastIDSet(long[] initialKeys);  FastIDSet(int size);  FastIDSet(int size, float loadFactor); 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(); }
FastIDSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } FastIDSet();  FastIDSet(long[] initialKeys);  FastIDSet(int size);  FastIDSet(int size, float loadFactor); 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();  }