@Test public void testExactSizeMatch() { SamplingLongPrimitiveIterator t = new SamplingLongPrimitiveIterator( countingIterator(10), 1); for (int i = 0; i < 10; i++) { assertTrue(t.hasNext()); assertEquals(i, t.next().intValue()); } assertFalse(t.hasNext()); }
@Override public boolean hasNext() { return hasNext; }
SamplingLongPrimitiveIterator extends AbstractLongPrimitiveIterator { @Override public boolean hasNext() { return hasNext; } }
SamplingLongPrimitiveIterator extends AbstractLongPrimitiveIterator { @Override public boolean hasNext() { return hasNext; } SamplingLongPrimitiveIterator(LongPrimitiveIterator delegate, double samplingRate);  SamplingLongPrimitiveIterator(RandomWrapper random, LongPrimitiveIterator delegate, double samplingRate); }
SamplingLongPrimitiveIterator extends AbstractLongPrimitiveIterator { @Override public boolean hasNext() { return hasNext; } SamplingLongPrimitiveIterator(LongPrimitiveIterator delegate, double samplingRate);  SamplingLongPrimitiveIterator(RandomWrapper random, LongPrimitiveIterator delegate, double samplingRate); @Override boolean hasNext(); @Override long nextLong(); @Override long peek(); @Override void remove(); @Override void skip(int n); static LongPrimitiveIterator maybeWrapIterator(LongPrimitiveIterator delegate, double samplingRate); }
SamplingLongPrimitiveIterator extends AbstractLongPrimitiveIterator { @Override public boolean hasNext() { return hasNext; } SamplingLongPrimitiveIterator(LongPrimitiveIterator delegate, double samplingRate);  SamplingLongPrimitiveIterator(RandomWrapper random, LongPrimitiveIterator delegate, double samplingRate); @Override boolean hasNext(); @Override long nextLong(); @Override long peek(); @Override void remove(); @Override void skip(int n); static LongPrimitiveIterator maybeWrapIterator(LongPrimitiveIterator delegate, double samplingRate);  }