@Test public void testIterator() { LongSet set = buildTestFastSet(); Collection<Long> expected = new HashSet<Long>(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(); }
LongSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } }
LongSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } LongSet();  LongSet(int initialCapacity); }
LongSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } LongSet();  LongSet(int initialCapacity); int size(); boolean isEmpty(); boolean contains(long key); boolean add(long key); @Override LongPrimitiveIterator iterator(); long[] toArray(); boolean remove(long key); boolean addAll(long[] keys); boolean addAll(LongSet keys); void clear(); void rehash(); int intersectionSize(LongSet other); @Override LongSet clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); }
LongSet implements Serializable, Cloneable, Iterable<Long> { @Override public LongPrimitiveIterator iterator() { return new KeyIterator(); } LongSet();  LongSet(int initialCapacity); int size(); boolean isEmpty(); boolean contains(long key); boolean add(long key); @Override LongPrimitiveIterator iterator(); long[] toArray(); boolean remove(long key); boolean addAll(long[] keys); boolean addAll(LongSet keys); void clear(); void rehash(); int intersectionSize(LongSet other); @Override LongSet clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString();  }