Lines Matching refs:TerminalOp
37 * Factory for instances of a short-circuiting {@code TerminalOp} that searches
50 * Constructs a {@code TerminalOp} for streams of objects.
53 * @param mustFindFirst whether the {@code TerminalOp} must produce the
55 * @return a {@code TerminalOp} implementing the find operation
58 public static <T> TerminalOp<T, Optional<T>> makeRef(boolean mustFindFirst) {
59 return (TerminalOp<T, Optional<T>>)
64 * Constructs a {@code TerminalOp} for streams of ints.
66 * @param mustFindFirst whether the {@code TerminalOp} must produce the
68 * @return a {@code TerminalOp} implementing the find operation
70 public static TerminalOp<Integer, OptionalInt> makeInt(boolean mustFindFirst) {
75 * Constructs a {@code TerminalOp} for streams of longs.
77 * @param mustFindFirst whether the {@code TerminalOp} must produce the
79 * @return a {@code TerminalOp} implementing the find operation
81 public static TerminalOp<Long, OptionalLong> makeLong(boolean mustFindFirst) {
88 * @param mustFindFirst whether the {@code TerminalOp} must produce the
90 * @return a {@code TerminalOp} implementing the find operation
92 public static TerminalOp<Double, OptionalDouble> makeDouble(boolean mustFindFirst) {
97 * A short-circuiting {@code TerminalOp} that searches for an element in a
106 private static final class FindOp<T, O> implements TerminalOp<T, O> {
197 static final TerminalOp<?, ?> OP_FIND_FIRST = new FindOp<>(true,
201 static final TerminalOp<?, ?> OP_FIND_ANY = new FindOp<>(false,
220 static final TerminalOp<Integer, OptionalInt> OP_FIND_FIRST = new FindOp<>(true,
223 static final TerminalOp<Integer, OptionalInt> OP_FIND_ANY = new FindOp<>(false,
242 static final TerminalOp<Long, OptionalLong> OP_FIND_FIRST = new FindOp<>(true,
245 static final TerminalOp<Long, OptionalLong> OP_FIND_ANY = new FindOp<>(false,
264 static final TerminalOp<Double, OptionalDouble> OP_FIND_FIRST = new FindOp<>(true,
267 static final TerminalOp<Double, OptionalDouble> OP_FIND_ANY = new FindOp<>(false,