当前位置: 首页>>代码示例>>Java>>正文


Java Spliterator.OfDouble方法代码示例

本文整理汇总了Java中java.util.Spliterator.OfDouble方法的典型用法代码示例。如果您正苦于以下问题:Java Spliterator.OfDouble方法的具体用法?Java Spliterator.OfDouble怎么用?Java Spliterator.OfDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Spliterator的用法示例。


在下文中一共展示了Spliterator.OfDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: trySplit

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
public Spliterator.OfDouble trySplit() {
    splits++;
    Spliterator.OfDouble prefix = psp.trySplit();
    if (prefix != null)
        prefixSplits++;
    return prefix;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:StreamSpliteratorTest.java

示例2: truncate

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
default Node.OfDouble truncate(long from, long to, IntFunction<Double[]> generator) {
    if (from == 0 && to == count())
        return this;
    long size = to - from;
    Spliterator.OfDouble spliterator = spliterator();
    Node.Builder.OfDouble nodeBuilder = Nodes.doubleBuilder(size);
    nodeBuilder.begin(size);
    for (int i = 0; i < from && spliterator.tryAdvance((DoubleConsumer) e -> { }); i++) { }
    for (int i = 0; (i < size) && spliterator.tryAdvance((DoubleConsumer) nodeBuilder); i++) { }
    nodeBuilder.end();
    return nodeBuilder.build();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:Node.java

示例3: spliterator

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
Spliterator.OfDouble spliterator();
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:3,代码来源:DoubleStream.java

示例4: lazySpliterator

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
final Spliterator.OfDouble lazySpliterator(Supplier<? extends Spliterator<Double>> supplier) {
    return new StreamSpliterators.DelegatingSpliterator.OfDouble((Supplier<Spliterator.OfDouble>) supplier);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:DoublePipeline.java

示例5: testDoubleForEach

import java.util.Spliterator; //导入方法依赖的package包/类
@Test(dataProvider = "Spliterator.OfDouble")
public void testDoubleForEach(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
    testForEach(exp, s, doubleBoxingConsumer());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:SpliteratorTraversingAndSplittingTest.java

示例6: add

import java.util.Spliterator; //导入方法依赖的package包/类
void add(String description, Supplier<Spliterator.OfDouble> s) {
    add(description, exp, s);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:4,代码来源:SpliteratorTraversingAndSplittingTest.java

示例7: OfDouble

import java.util.Spliterator; //导入方法依赖的package包/类
OfDouble(Spliterator.OfDouble s, UnorderedWhileSpliterator.OfDouble parent) {
    super(s, parent);
    this.p = parent.p;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:WhileOps.java

示例8: testDoubleNullPointerException

import java.util.Spliterator; //导入方法依赖的package包/类
@Test(dataProvider = "Spliterator.OfDouble")
public void testDoubleNullPointerException(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
    executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((DoubleConsumer) null));
    executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((DoubleConsumer) null));
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SpliteratorTraversingAndSplittingTest.java

示例9: OfDouble

import java.util.Spliterator; //导入方法依赖的package包/类
OfDouble(Spliterator.OfDouble s, long skip, long limit) {
    super(s, skip, limit);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:StreamSpliterators.java

示例10: spliterator

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
public Spliterator.OfDouble spliterator() {
    assert !building : "during building";
    return super.spliterator();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:Nodes.java

示例11: OfDouble

import java.util.Spliterator; //导入方法依赖的package包/类
OfDouble(Spliterator.OfDouble s, long sliceOrigin, long sliceFence) {
    super(s, sliceOrigin, sliceFence);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:4,代码来源:StreamSpliterators.java

示例12: OfDouble

import java.util.Spliterator; //导入方法依赖的package包/类
private OfDouble(Spliterator.OfDouble sp, boolean proxyEstimateSize) {
    super(sp, proxyEstimateSize);
    this.psp = sp;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:5,代码来源:StreamSpliteratorTest.java

示例13: spliterator

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
public Spliterator.OfDouble spliterator() {
    return Spliterators.emptyDoubleSpliterator();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:Nodes.java

示例14: testDoubleMixedTraverseAndSplit

import java.util.Spliterator; //导入方法依赖的package包/类
@Test(dataProvider = "Spliterator.OfDouble")
public void testDoubleMixedTraverseAndSplit(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
    testMixedTraverseAndSplit(exp, s, doubleBoxingConsumer());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:SpliteratorTraversingAndSplittingTest.java

示例15: makeSpliterator

import java.util.Spliterator; //导入方法依赖的package包/类
@Override
protected Spliterator.OfDouble makeSpliterator(Spliterator.OfDouble s) {
    return new UnorderedSliceSpliterator.OfDouble(s, this);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:StreamSpliterators.java


注:本文中的java.util.Spliterator.OfDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。