當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。