public static interface Spliterator.OfPrimitive 
 implements Spliterator<T>
| java.util.Spliterator.OfPrimitive<T, T_CONS, T_SPLITR extends java.util.Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> | 
|  Known Indirect Subclasses | 
专为原始值设计的Spliterator。
| Inherited constants | 
|---|
|  From interface  java.util.Spliterator  | 
| Public methods | |
|---|---|
|  default void |  forEachRemaining(T_CONS action) 对当前线程中的每个剩余元素执行给定操作,直到处理完所有元素或操作抛出异常。 | 
|  abstract boolean |  tryAdvance(T_CONS action) 如果剩余的元素存在,则对其执行给定的操作,返回 | 
|  abstract T_SPLITR |  trySplit() 如果这个分割器可以被分割,返回一个Spliterator覆盖元素,当从这个方法返回时,不会被这个分割器覆盖。 | 
| Inherited methods | |
|---|---|
|  From interface  java.util.Spliterator  | |
void forEachRemaining (T_CONS action)
对当前线程中的每个剩余元素执行给定操作,直到处理完所有元素或操作抛出异常。 如果此Spliterator是ORDERED ,则按照相遇顺序执行操作。 该操作引发的异常会中继给调用者。
tryAdvance(T_CONS) until it returns false. It should be overridden whenever possible.| Parameters | |
|---|---|
| action | T_CONS: The action | 
| Throws | |
|---|---|
| NullPointerException | if the specified action is null | 
boolean tryAdvance (T_CONS action)
如果剩余的元素存在,则对其执行给定的操作,返回true ; 否则返回false 。 如果这个Spliterator是ORDERED ,那么这个动作是在遇到次序中的下一个元素上执行的。 该操作引发的异常会中继给调用者。
| Parameters | |
|---|---|
| action | T_CONS: The action | 
| Returns | |
|---|---|
| boolean | falseif no remaining elements existed upon entry to this method, elsetrue. | 
| Throws | |
|---|---|
| NullPointerException | if the specified action is null | 
T_SPLITR trySplit ()
如果这个分割器可以被分割,返回一个Spliterator覆盖元素,当从这个方法返回时,不会被这个分割器覆盖。
如果此Spliterator为 ORDERED ,则返回的Spliterator必须覆盖元素的严格前缀。
除非此Spliterator覆盖无限数量的元素,否则重复调用trySplit()最终必须返回null 。 非空返回时:
estimateSize() before splitting, must, after splitting, be greater than or equal to estimateSize() for this and the returned Spliterator; andSUBSIZED, then estimateSize() for this spliterator before splitting must be equal to the sum of estimateSize() for this and the returned Spliterator after splitting.此方法可能因任何原因返回 null ,包括空行,遍历开始后无法拆分,数据结构约束和效率考虑。
| Returns | |
|---|---|
| T_SPLITR | a Spliteratorcovering some portion of the elements, ornullif this spliterator cannot be split |