Interface ObjectSampler<T>

    • Method Detail

      • sample

        T sample()
        Create an object sample.
        Returns:
        a sample.
      • samples

        default Stream<Tsamples()
        Returns an effectively unlimited stream of object sample values.

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

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

        default Stream<Tsamples​(long streamSize)
        Returns a stream producing the given streamSize number of object 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 object values.
        Since:
        1.5