Interface LongSampler
-
- All Known Subinterfaces:
SharedStateLongSampler
- All Known Implementing Classes:
UniformLongSampler
public interface LongSampler
Sampler that generates values of typelong
.- Since:
- 1.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description long
sample()
Creates along
sample.default LongStream
samples()
Returns an effectively unlimited stream oflong
sample values.default LongStream
samples(long streamSize)
Returns a stream producing the givenstreamSize
number oflong
sample values.
-
-
-
Method Detail
-
sample
long sample()
Creates along
sample.- Returns:
- a sample.
-
samples
default LongStream samples()
Returns an effectively unlimited stream oflong
sample values.The default implementation produces a sequential stream that repeatedly calls
sample
().- Returns:
- a stream of
long
values. - Since:
- 1.5
-
samples
default LongStream samples(long streamSize)
Returns a stream producing the givenstreamSize
number oflong
sample values.The default implementation produces a sequential stream that repeatedly calls
sample
(); the stream is limited to the givenstreamSize
.- Parameters:
streamSize
- Number of values to generate.- Returns:
- a stream of
long
values. - Since:
- 1.5
-
-