Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
605a051c
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
605a051c
编写于
7月 09, 2013
作者:
P
psandoz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8019551: Make BaseStream public
Reviewed-by: chegar, psandoz Contributed-by:
N
brian goetz
<
brian.goetz@oracle.com
>
上级
a96e6090
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
22 deletion
+7
-22
src/share/classes/java/util/stream/AbstractPipeline.java
src/share/classes/java/util/stream/AbstractPipeline.java
+5
-18
src/share/classes/java/util/stream/BaseStream.java
src/share/classes/java/util/stream/BaseStream.java
+2
-4
未找到文件。
src/share/classes/java/util/stream/AbstractPipeline.java
浏览文件 @
605a051c
...
...
@@ -53,11 +53,6 @@ import java.util.function.Supplier;
* operation, the stream is considered to be consumed, and no more intermediate
* or terminal operations are permitted on this stream instance.
*
* <p>{@code AbstractPipeline} implements a number of methods that are
* specified in {@link BaseStream}, though it does not implement
* {@code BaseStream} directly. Subclasses of {@code AbstractPipeline}
* will generally implement {@code BaseStream}.
*
* @implNote
* <p>For sequential streams, and parallel streams without
* <a href="package-summary.html#StreamOps">stateful intermediate
...
...
@@ -75,7 +70,7 @@ import java.util.function.Supplier;
* @since 1.8
*/
abstract
class
AbstractPipeline
<
E_IN
,
E_OUT
,
S
extends
BaseStream
<
E_OUT
,
S
>>
extends
PipelineHelper
<
E_OUT
>
{
extends
PipelineHelper
<
E_OUT
>
implements
BaseStream
<
E_OUT
,
S
>
{
/**
* Backlink to the head of the pipeline chain (self if this is the source
* stage).
...
...
@@ -286,26 +281,20 @@ abstract class AbstractPipeline<E_IN, E_OUT, S extends BaseStream<E_OUT, S>>
// BaseStream
/**
* Implements {@link BaseStream#sequential()}
*/
@Override
public
final
S
sequential
()
{
sourceStage
.
parallel
=
false
;
return
(
S
)
this
;
}
/**
* Implements {@link BaseStream#parallel()}
*/
@Override
public
final
S
parallel
()
{
sourceStage
.
parallel
=
true
;
return
(
S
)
this
;
}
// Primitive specialization use co-variant overrides, hence is not final
/**
* Implements {@link BaseStream#spliterator()}
*/
@Override
public
Spliterator
<
E_OUT
>
spliterator
()
{
if
(
linkedOrConsumed
)
throw
new
IllegalStateException
(
"stream has already been operated upon"
);
...
...
@@ -331,9 +320,7 @@ abstract class AbstractPipeline<E_IN, E_OUT, S extends BaseStream<E_OUT, S>>
}
}
/**
* Implements {@link BaseStream#isParallel()}
*/
@Override
public
final
boolean
isParallel
()
{
return
sourceStage
.
parallel
;
}
...
...
src/share/classes/java/util/stream/BaseStream.java
浏览文件 @
605a051c
...
...
@@ -29,15 +29,13 @@ import java.util.Spliterator;
/**
* Base interface for stream types such as {@link Stream}, {@link IntStream},
* etc. Contains methods common to all stream types. Many of these methods
* are implemented by {@link AbstractPipeline}, even though
* {@code AbstractPipeline} does not directly implement {@code BaseStream}.
* etc. Contains methods common to all stream types.
*
* @param <T> type of stream elements
* @param <S> type of stream implementing {@code BaseStream}
* @since 1.8
*/
interface
BaseStream
<
T
,
S
extends
BaseStream
<
T
,
S
>>
{
public
interface
BaseStream
<
T
,
S
extends
BaseStream
<
T
,
S
>>
{
/**
* Returns an iterator for the elements of this stream.
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录