internal RandomLongsSpliterator(SplittableRandom rng, long index, long fence, long origin, long bound) { this.Rng = rng; this.Index = index; this.Fence = fence; this.Origin = origin; this.Bound = bound; }
public void ForEachRemaining(LongConsumer consumer) { if (consumer == null) { throw new NullPointerException(); } long i = Index, f = Fence; if (i < f) { Index = f; SplittableRandom r = Rng; long o = Origin, b = Bound; do { consumer.Accept(r.InternalNextLong(o, b)); } while (++i < f); } }
internal SplittableRandomGenerator(SplittableRandom random) { this._random = random; }