title: Why does Stream.Builder have both add and accept methods?
body: <p>I was using a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.Builder.html" rel="noreferrer"><code>Stream.Builder</code></a> and I stumbled upon the fact that this interface has both the methods <code>accept(T t)</code> and <code>add(T t)</code>. The only difference is that the former returns <code>void</code> and the latter returns a <code>Stream.Builder</code>.</p>
  <p>The documentation even mentions these methods to have the same default implementation:</p>
  <blockquote>
  <p>The default implementation behaves as if:</p>
  <pre><code>accept(t)
  return this;
  </code></pre>
  </blockquote>
  <p><sup>Note that they forgot a semicolon, but that's another story.</sup></p>
  <p>My question is: <em>why</em> do they have two methods to add something to the stream builder? I think this clutters the API, and I thought they wanted to <a href="https://stackoverflow.com/questions/32459683/in-java-8-is-there-a-bytestream-class">avoid that</a>.</p>
  <p>Is there any compelling reason to do so?</p>