Others have answered how to provide a general-purpose Stream
implementation. Regarding your specific requirement, just do this:
class Foo {
T t1, t2, t3;
Foo(T t1, T t2, T t3) {
this.t1 = t1;
this.t2 = t2;
this.t3 = t3;
}
Stream stream() {
return Stream.of(t1, t2, t3);
}
}