<p dir="ltr">I don&#39;t want this ints() to be confused with the one you want to add to generators. So I would name it intStream() or randomInts().</p>
<div class="gmail_quote">On Dec 31, 2012 10:41 AM, &quot;Brian Goetz&quot; &lt;<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On the list of requested stream sources is &#39;stream of random numbers&#39;.<br>
<br>
Here&#39;s a one-line addition to Random:<br>
<br>
    public IntStream ints() {<br>
        return PrimitiveStreams.repeatedly(<u></u>this::nextInt);<br>
    }<br>
<br>
Certainly the implementation is straightforward enough (modulo renaming of PrimitiveStreams and repeatedly, which are not yet nailed down.)<br>
<br>
Any objections here?  Clearly we&#39;d want to support streams of ints, longs, and doubles, so just calling it stream() is wrong; should they be called random.ints(), or random.intStream()?<br>
<br>
<br>
</blockquote></div>