Characteristics of an empty spliterator
Dmitry Bessonov
dmitry.bessonov at oracle.com
Tue Mar 26 03:55:07 PDT 2013
Hello,
I wonder what are the expected characteristics of empty spliterators?
Having SIZED and not having INFINITE is logical.
What about SUBSIZED characteristic
which the current implementation gives to an empty spliterator?
/**
* Characteristic value signifying that this, and all Spliterators
* resulting from {@code trySplit()}, as well as any that they in
* turn split, are {@link #SIZED}. .......
*/
public static final int SUBSIZED = 0x00010000;
Current behavior of method trySplit() of an empty spliterator
indicates that it could not be ever split.
So this seems like a spec contradiction.
May it make sense to specify characteristics of an empty spliterator
explicitly?
-Dmitry
More information about the lambda-dev
mailing list