public static interface IntStream.Builder extends IntConsumer
IntStream
易变的建设者。
流生成器有一个生命周期,它开始在一个构建阶段,在此期间可以添加元素,然后过渡到一个内置的阶段,在此之后,元素可能不会被添加。建立阶段开始时的build()
方法被调用时,它创建一个命令流的元素被添加到流生成器的元素,在添加时的顺序。
IntStream.builder()
Modifier and Type | Method and Description |
---|---|
void |
accept(int t)
将一个元素添加到正在构建的流中。
|
default IntStream.Builder |
add(int t)
将一个元素添加到正在构建的流中。
|
IntStream |
build()
建立流,把Builder建立的国家。
|
andThen
void accept(int t)
accept
接口
IntConsumer
t
-输入参数
IllegalStateException
如果Builder已经过渡到了国家
default IntStream.Builder add(int t)
accept(t)
return this;
t
-元素添加
this
生成器
IllegalStateException
如果Builder已经过渡到了国家
IntStream build()
IllegalStateException
是如果有进一步的尝试使用Builder后已进入了国家投。
IllegalStateException
如果Builder已经过渡到了国家
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.