paul.sandoz at oracle.com
Mon May 6 09:56:48 PDT 2013
Brian and I re-introduced a simpler form of Spliterator.OfPrimitive.
public interface OfPrimitive<T, T_CONS, T_SPL extends Spliterator.OfPrimitive<T, T_CONS, T_SPL>> extends Spliterator<T>
This enables more sharing of primitive-based spliterator code, for example:
This should also reduce the bloat of primitive-based concat spliterator implementations, if we choose to add concatenation of primitive-based streams.
We could go further and provide limits for the types declared by OfPrimitive:
- T extends PrimitiveWrapper<T>, and require Integer extends PrimitiveWrapper<Integer>
- T_CONS extends PrimitiveConsumer<T>, and require IntConsumer extends PrimitiveConsumer<Integer>
But i am inclined to leave it as is.
More information about the lambda-libs-spec-observers