Implementation Note
The implementation is based on the code for the Array-based spliterators.
| Modifier and Type | Field and Description |
|---|---|
| private final CharBuffer | |
| private int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | characteristics()
Implements java. Returns a set of characteristics of this Spliterator and its elements. |
| public long | estimateSize()
Implements java. Returns an estimate of the number of elements that would be
encountered by a |
| public void | forEachRemaining(IntConsumer action)
Overrides default java. Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception. |
| public boolean | tryAdvance(IntConsumer action)
Implements java. If a remaining element exists, performs the given action on it,
returning |
| public Spliterator. | trySplit()
Implements java. If this spliterator can be partitioned, returns a Spliterator covering elements, that will, upon return from this method, not be covered by this Spliterator. |
| buffer | back to summary |
|---|---|
| private final CharBuffer buffer | |
| index | back to summary |
|---|---|
| private int index | |
| limit | back to summary |
|---|---|
| private final int limit | |
| CharBufferSpliterator | back to summary |
|---|---|
| pack-priv CharBufferSpliterator(CharBuffer buffer) | |
| CharBufferSpliterator | back to summary |
|---|---|
| pack-priv CharBufferSpliterator(CharBuffer buffer, int origin, int limit) | |
| characteristics | back to summary |
|---|---|
| public int characteristics() Implements java. Doc from java. Returns a set of characteristics of this Spliterator and its
elements. The result is represented as ORed values from If a Spliterator reports an inconsistent set of characteristics (either those returned from a single invocation or across multiple invocations), no guarantees can be made about any computation using this Spliterator.
| |
| estimateSize | back to summary |
|---|---|
| public long estimateSize() Implements java. Doc from java. Returns an estimate of the number of elements that would be
encountered by a If this Spliterator is
| |
| forEachRemaining | back to summary |
|---|---|
| public void forEachRemaining(IntConsumer action) Overrides default java. Doc from java. Performs the given action for each remaining element, sequentially in
the current thread, until all elements have been processed or the
action throws an exception. If this Spliterator is Subsequent behavior of a spliterator is unspecified if the action throws an exception.
| |
| tryAdvance | back to summary |
|---|---|
| public boolean tryAdvance(IntConsumer action) Implements java. Doc from java. If a remaining element exists, performs the given action on it,
returning Subsequent behavior of a spliterator is unspecified if the action throws an exception.
| |
| trySplit | back to summary |
|---|---|
| public Spliterator. Implements java. Doc from java. If this spliterator can be partitioned, returns a Spliterator covering elements, that will, upon return from this method, not be covered by this Spliterator. If this Spliterator is Unless this Spliterator covers an infinite number of elements,
repeated calls to
This method may return
| |