-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add XTerminatingOperationFactory, Work on #44
- Loading branch information
Showing
14 changed files
with
1,298 additions
and
2 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...main/java/com/speedment/jpastreamer/pipeline/terminal/DoubleTerminalOperationFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* JPAstreamer - Express JPA queries with Java Streams | ||
* Copyright (c) 2020-2020, Speedment, Inc. All Rights Reserved. | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* | ||
* See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE | ||
*/ | ||
package com.speedment.jpastreamer.pipeline.terminal; | ||
|
||
import java.util.*; | ||
import java.util.function.*; | ||
import java.util.stream.DoubleStream; | ||
import java.util.stream.IntStream; | ||
|
||
public interface DoubleTerminalOperationFactory extends BaseStreamTerminalOperationFactory { | ||
|
||
TerminalOperation<DoubleStream, Void> createForEach(DoubleConsumer action); | ||
|
||
TerminalOperation<DoubleStream, Void> createForEachOrdered(DoubleConsumer action); | ||
|
||
TerminalOperation<DoubleStream, double[]> acquireToArray(); | ||
|
||
TerminalOperation<DoubleStream, Double> createReduce(double identity, DoubleBinaryOperator op); | ||
|
||
TerminalOperation<DoubleStream, OptionalDouble> createReduce(DoubleBinaryOperator op); | ||
|
||
<R> TerminalOperation<DoubleStream, R> createCollect(Supplier<R> supplier, | ||
ObjDoubleConsumer<R> accumulator, | ||
BiConsumer<R, R> combiner); | ||
|
||
TerminalOperation<DoubleStream, Double> acquireSum(); | ||
|
||
TerminalOperation<DoubleStream, OptionalDouble> acquireMin(); | ||
|
||
TerminalOperation<DoubleStream, OptionalDouble> acquireMax(); | ||
|
||
TerminalOperation<DoubleStream, Long> acquireCount(); | ||
|
||
|
||
TerminalOperation<DoubleStream, OptionalDouble> acquireAverage(); | ||
|
||
TerminalOperation<DoubleStream, DoubleSummaryStatistics> acquireSummaryStatistics(); | ||
|
||
|
||
TerminalOperation<DoubleStream, Boolean> createAnyMatch(DoublePredicate predicate); | ||
|
||
TerminalOperation<DoubleStream, Boolean> createAllMatch(DoublePredicate predicate); | ||
|
||
TerminalOperation<DoubleStream, Boolean> createNoneMatch(DoublePredicate predicate); | ||
|
||
TerminalOperation<DoubleStream, OptionalDouble> acquireFindFirst(); | ||
|
||
TerminalOperation<DoubleStream, OptionalDouble> acquireFindAny(); | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
TerminalOperation<DoubleStream, PrimitiveIterator.OfDouble> acquireIterator(); | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
TerminalOperation<DoubleStream, Spliterator.OfDouble> acquireSpliterator(); | ||
|
||
} |
67 changes: 67 additions & 0 deletions
67
...rc/main/java/com/speedment/jpastreamer/pipeline/terminal/IntTerminalOperationFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* JPAstreamer - Express JPA queries with Java Streams | ||
* Copyright (c) 2020-2020, Speedment, Inc. All Rights Reserved. | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* | ||
* See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE | ||
*/ | ||
package com.speedment.jpastreamer.pipeline.terminal; | ||
|
||
import java.util.*; | ||
import java.util.function.*; | ||
import java.util.stream.BaseStream; | ||
import java.util.stream.IntStream; | ||
|
||
public interface IntTerminalOperationFactory extends BaseStreamTerminalOperationFactory { | ||
|
||
TerminalOperation<IntStream, Void> createForEach(IntConsumer action); | ||
|
||
TerminalOperation<IntStream, Void> createForEachOrdered(IntConsumer action); | ||
|
||
TerminalOperation<IntStream, int[]> acquireToArray(); | ||
|
||
TerminalOperation<IntStream, Integer> createReduce(int identity, IntBinaryOperator op); | ||
|
||
TerminalOperation<IntStream, OptionalInt> createReduce(IntBinaryOperator op); | ||
|
||
<R> TerminalOperation<IntStream, R> createCollect(Supplier<R> supplier, | ||
ObjIntConsumer<R> accumulator, | ||
BiConsumer<R, R> combiner); | ||
|
||
TerminalOperation<IntStream, Integer> acquireSum(); | ||
|
||
TerminalOperation<IntStream, OptionalInt> acquireMin(); | ||
|
||
TerminalOperation<IntStream, OptionalInt> acquireMax(); | ||
|
||
TerminalOperation<IntStream, Long> acquireCount(); | ||
|
||
|
||
TerminalOperation<IntStream, OptionalDouble> acquireAverage(); | ||
|
||
TerminalOperation<IntStream, IntSummaryStatistics> acquireSummaryStatistics(); | ||
|
||
|
||
TerminalOperation<IntStream, Boolean> createAnyMatch(IntPredicate predicate); | ||
|
||
TerminalOperation<IntStream, Boolean> createAllMatch(IntPredicate predicate); | ||
|
||
TerminalOperation<IntStream, Boolean> createNoneMatch(IntPredicate predicate); | ||
|
||
TerminalOperation<IntStream, OptionalInt> acquireFindFirst(); | ||
|
||
TerminalOperation<IntStream, OptionalInt> acquireFindAny(); | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
TerminalOperation<IntStream, PrimitiveIterator.OfInt> acquireIterator(); | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
TerminalOperation<IntStream, Spliterator.OfInt> acquireSpliterator(); | ||
} |
67 changes: 67 additions & 0 deletions
67
...c/main/java/com/speedment/jpastreamer/pipeline/terminal/LongTerminalOperationFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* JPAstreamer - Express JPA queries with Java Streams | ||
* Copyright (c) 2020-2020, Speedment, Inc. All Rights Reserved. | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* | ||
* See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE | ||
*/ | ||
package com.speedment.jpastreamer.pipeline.terminal; | ||
|
||
import java.util.*; | ||
import java.util.function.*; | ||
import java.util.stream.LongStream; | ||
|
||
public interface LongTerminalOperationFactory extends BaseStreamTerminalOperationFactory { | ||
|
||
TerminalOperation<LongStream, Void> createForEach(LongConsumer action); | ||
|
||
TerminalOperation<LongStream, Void> createForEachOrdered(LongConsumer action); | ||
|
||
TerminalOperation<LongStream, long[]> acquireToArray(); | ||
|
||
TerminalOperation<LongStream, Long> createReduce(long identity, LongBinaryOperator op); | ||
|
||
TerminalOperation<LongStream, OptionalLong> createReduce(LongBinaryOperator op); | ||
|
||
<R> TerminalOperation<LongStream, R> createCollect(Supplier<R> supplier, | ||
ObjLongConsumer<R> accumulator, | ||
BiConsumer<R, R> combiner); | ||
|
||
TerminalOperation<LongStream, Long> acquireSum(); | ||
|
||
TerminalOperation<LongStream, OptionalLong> acquireMin(); | ||
|
||
TerminalOperation<LongStream, OptionalLong> acquireMax(); | ||
|
||
TerminalOperation<LongStream, Long> acquireCount(); | ||
|
||
|
||
TerminalOperation<LongStream, OptionalDouble> acquireAverage(); | ||
|
||
TerminalOperation<LongStream, LongSummaryStatistics> acquireSummaryStatistics(); | ||
|
||
|
||
TerminalOperation<LongStream, Boolean> createAnyMatch(LongPredicate predicate); | ||
|
||
TerminalOperation<LongStream, Boolean> createAllMatch(LongPredicate predicate); | ||
|
||
TerminalOperation<LongStream, Boolean> createNoneMatch(LongPredicate predicate); | ||
|
||
TerminalOperation<LongStream, OptionalLong> acquireFindFirst(); | ||
|
||
TerminalOperation<LongStream, OptionalLong> acquireFindAny(); | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
TerminalOperation<LongStream, PrimitiveIterator.OfLong> acquireIterator(); | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
TerminalOperation<LongStream, Spliterator.OfLong> acquireSpliterator(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.