public static interface LongStream.Builder extends LongConsumer
LongStream易变的建设者。
流生成器有一个生命周期,它开始在一个构建阶段,在此期间可以添加元素,然后过渡到一个内置的阶段,在此之后,元素可能不会被添加。建立阶段开始时开始build()方法被调用时,它创建一个命令流的元素被添加到流生成器的元素,在添加时的顺序。
LongStream.builder()
| Modifier and Type | Method and Description |
|---|---|
void |
accept(long t)
将一个元素添加到正在构建的流中。
|
default LongStream.Builder |
add(long t)
将一个元素添加到正在构建的流中。
|
LongStream |
build()
建立流,把Builder建立的国家。
|
andThenvoid accept(long t)
accept 接口
LongConsumer
t -输入参数
IllegalStateException如果Builder已经过渡到了国家
default LongStream.Builder add(long t)
accept(t)
return this;
t -元素添加
this生成器
IllegalStateException如果Builder已经过渡到了国家
LongStream 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.