Why Java 8 does not have StringStream and CharStream.
StringStream.of("String1","String2");
StringStream.concat(stream1,stream2);
StringStream.builder().add("String1").add("string2").accept("string3");
Why Java 8 does not have StringStream and CharStream.
StringStream.of("String1","String2");
StringStream.concat(stream1,stream2);
StringStream.builder().add("String1").add("string2").accept("string3");
There is no char
stream for same reason there is no byte
stream. All those specific stream added for optimization (no boxing/unboxing). char
and byte
internally represented as int
so there will be no profit in adding them.
Of course they should add them for convenience, but they didn't.
There is no String
stream because there is no reason for it. String
is reference type, so normal stream will work with it just fine.