public interface Splittable<S extends Splittable<S>>
This does a similar job to
but it imposes no assumptions about the form of the split objects,
for instance that they form a sequence that can be iterated over
internally, which idiom forms the basis of the Java 8 streams framework.
Collections or sequences based on Splittable can use external
iteration, which allows better control in some cases.
|Modifier and Type||Method and Description|
Attempts to partition this object into two halves, ideally of similar size.
Provides an estimate of the number of processable items in this object.
Following a successful call, the two parts may be processed in different threads.
If no estimate for the size is available, a negative value should be returned.