Interface DiscreteSampler

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      int sample()
      Creates an int sample.
      default java.util.stream.IntStream samples()
      Returns an effectively unlimited stream of int sample values.
      default java.util.stream.IntStream samples​(long streamSize)
      Returns a stream producing the given streamSize number of int sample values.
    • Method Detail

      • sample

        int sample()
        Creates an int sample.
        Returns:
        a sample.
      • samples

        default java.util.stream.IntStream samples()
        Returns an effectively unlimited stream of int sample values.

        The default implementation produces a sequential stream that repeatedly calls sample().

        Returns:
        a stream of int values.
        Since:
        1.5
      • samples

        default java.util.stream.IntStream samples​(long streamSize)
        Returns a stream producing the given streamSize number of int sample values.

        The default implementation produces a sequential stream that repeatedly calls sample(); the stream is limited to the given streamSize.

        Parameters:
        streamSize - Number of values to generate.
        Returns:
        a stream of int values.
        Since:
        1.5