title: How to implement a Java stream?
body: <p>I want to implement a <code>Stream&lt;T&gt;</code>.</p>
  
  <p>I don't want to just use <code>implements Stream&lt;T&gt;</code>, because I would have to implement a ton of methods.</p>
  
  <p>Can this be avoided?</p>
  
  <p>To be more concrete, how can I stream <code>t1</code>, <code>t2</code> and <code>t3</code> for example:</p>
  
  <pre><code>class Foo&lt;T&gt; {
      T t1, t2, t3;
  
      Foo(T t1, T t2, T t3) {
          this.t1 = t1;
          this.t2 = t2;
          this.t3 = t3;
      }
  }
  </code></pre>