本文整理了Java中java.util.stream.DoubleStream.spliterator()
方法的一些代码示例,展示了DoubleStream.spliterator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DoubleStream.spliterator()
方法的具体详情如下:
包路径:java.util.stream.DoubleStream
类名称:DoubleStream
方法名:spliterator
暂无
代码示例来源:origin: speedment/speedment
@Override
public Spliterator.OfDouble execute() {
try (final DoubleStream stream = buildPrevious()) {
return stream.spliterator();
}
}
}
代码示例来源:origin: speedment/speedment
default Spliterator.OfDouble spliterator(DoublePipeline pipeline) {
requireNonNull(pipeline);
return optimize(pipeline).getAsDoubleStream().spliterator();
}
代码示例来源:origin: google/guava
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
代码示例来源:origin: prestodb/presto
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
代码示例来源:origin: speedment/speedment
@Override
public Spliterator.OfDouble spliterator() {
if (isAllowStreamIteratorAndSpliterator()) {
return stream().spliterator();
}
throw newUnsupportedException("spliterator");
}
代码示例来源:origin: google/guava
checkNotNull(function);
boolean isParallel = stream.isParallel();
Spliterator.OfDouble fromSpliterator = stream.spliterator();
代码示例来源:origin: wildfly/wildfly
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
代码示例来源:origin: google/j2objc
checkNotNull(function);
boolean isParallel = stream.isParallel();
Spliterator.OfDouble fromSpliterator = stream.spliterator();
代码示例来源:origin: wildfly/wildfly
checkNotNull(function);
boolean isParallel = stream.isParallel();
Spliterator.OfDouble fromSpliterator = stream.spliterator();
代码示例来源:origin: prestodb/presto
checkNotNull(function);
boolean isParallel = stream.isParallel();
Spliterator.OfDouble fromSpliterator = stream.spliterator();
代码示例来源:origin: aol/cyclops
/**
* Peform intermediate operations on a primitive IntStream (gives improved performance when working with Integers)
* If this ReactiveSeq has an OfInt Spliterator it will be converted directly to an IntStream,
* otherwise the provided conversion function will be used.
*
* <pre>
* {@code
* ReactiveSeq.range(1, 1000)
* .doubles(i->i.doubleValue(),s->s.map(i->i*2).filter(i->i<500))
.size(),
//249
*
* </pre>
*
*
* @param fn
* @param mapper
* @return
*/
default ReactiveSeq<Double> doubles(ToDoubleFunction<? super T> fn,Function<? super DoubleStream, ? extends DoubleStream> mapper){
return ReactiveSeq.fromSpliterator(mapper.apply(mapToDouble(fn)).spliterator());
}
代码示例来源:origin: aol/cyclops
@Deprecated //moved to cyclops.companion.Functions
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: aol/cyclops
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->ReactiveSeq.fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: se.ugli.ugli-commons/ugli-commons
@Override
public java.util.Spliterator.OfDouble spliterator() {
// This is a terminal operation
return evalAndclose(() -> stream.spliterator());
}
代码示例来源:origin: soabase/soabase-halva
@Override
public For forCompDouble(AnyVal<Double> any, Supplier<DoubleStream> stream)
{
streamFor.forComp(any, () -> StreamSupport.stream(stream.get().spliterator(), false));
return this;
}
代码示例来源:origin: com.speedment.runtime/runtime-core
@Override
public Spliterator.OfDouble spliterator() {
if (isAllowStreamIteratorAndSpliterator()) {
return stream().spliterator();
}
throw newUnsupportedException("spliterator");
}
代码示例来源:origin: io.prestosql/presto-jdbc
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
代码示例来源:origin: seznam/euphoria
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
代码示例来源:origin: com.facebook.presto/presto-jdbc
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
代码示例来源:origin: org.apache.ratis/ratis-proto-shaded
/**
* Appends all values from {@code stream}, in order, to the end of the values the built {@link
* ImmutableDoubleArray} will contain.
*/
public Builder addAll(DoubleStream stream) {
Spliterator.OfDouble spliterator = stream.spliterator();
long size = spliterator.getExactSizeIfKnown();
if (size > 0) { // known *and* nonempty
ensureRoomFor(Ints.saturatedCast(size));
}
spliterator.forEachRemaining((DoubleConsumer) this::add);
return this;
}
内容来源于网络,如有侵权,请联系作者删除!