Constructs a {@code TerminalOp} for streams of longs.

@param mustFindFirst whether the {@code TerminalOp} must produce the
first element in the encounter order
@return a {@code TerminalOp} implementing the find operation
972297
public static TerminalOp<Long, OptionalLong> makeLong(boolean mustFindFirst) {
        return new FindOp<>(mustFindFirst, StreamShape.LONG_VALUE, OptionalLong.empty(),
                            OptionalLong::isPresent, FindSink.OfLong::new);
    }
195500
public static String findStartsWithOperation(List<? extends CompleteOperation> coList) {
        List<String> tmpList = new ArrayList<>();
        for (CompleteOperation co : coList) {
            String s = findStartsWith(co.getFormattedCompletionCandidates());
            if (s.length() > 0)
                tmpList.add(s);
            else
                return "";
        }
        return findStartsWith(tmpList);
    }
442343
public static <T extends MethodDescription> ElementMatcher.Junction<T> isDefaultFinalizer() {
        return isFinalizer().and(isDeclaredBy(TypeDescription.OBJECT));
    }
1366946
protected final <T extends AItemSpecifics<?,  ?>> int findFirstIdxFor(final List<T> pOutdGdSpList, final IHasIdLongVersionName pItem) {
    int j = 0;
    while (!pOutdGdSpList.get(j).getItem().getItsId().equals(pItem.getItsId())) {
      j++;
    }
    return j;
  }
790775
@Action(
            restrictTo = RestrictTo.PROTOTYPING
    )
    @MemberOrder(sequence="20")
    public Object installFixturesAndReturnFirst() {
        final List<FixtureResult> run = findFixtureScriptFor(ExampleTaggableEntitiesSetUpFixture.class).run(null);
        return run.get(0).getObject();
    }
590144
public <B> StreamT<W,B> flatMapT(final Function<? super T, StreamT<W,B>> f) {

        return of(run.map(list -> list.flatMap(a -> f.apply(a).run.stream())
                                      .flatMap(a -> a)));
    }
1254682
public <ResultT> CoreRemoteFindIterable<ResultT> find(
      final Bson filter,
      final Class<ResultT> resultClass
  ) {
    return createFindIterable(filter, resultClass);
  }
375982
public RemoteFindIterable<DocumentT> find(final Bson filter) {
    return new RemoteFindIterableImpl<>(proxy.find(filter), dispatcher);
  }
633950
public static <T extends Throwable> T findException(Class<T> exceptionTypeToFind, Throwable t) {

    Throwable cause = t;

    while (cause != null)
    {
      if( exceptionTypeToFind.isAssignableFrom( cause.getClass() ) )
      {
        //noinspection unchecked
        return (T)cause;
      }
      if( cause == cause.getCause() )
      {
        return null;
      }
      cause = cause.getCause();
    }

    return null;
  }
951699
public @NotNull <T> Optional<T> findOptional(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) {
        return findOptional(rowMapper, SqlQuery.query(sql, args));
    }
504238
public static <T> Optional<T> findFirst(Class<T> clazz) {
    ServiceLoader<T> load = ServiceLoader.load(clazz);
    return StreamSupport.stream(load.spliterator(), false).findFirst();
  }
950890
public void find(ResultStream<Cursor> result, String sql, Object ...args)
  {
    _kraken.findStream(sql, args, result);
  }
1311672
private void findBestWithFirst(DatanodeDescriptor first,
      List<DatanodeDescriptor> listOfNodes, DatanodeDescriptor[] result) {
    for (int in2 = 0; in2 < listOfNodes.size(); in2++) {
      DatanodeDescriptor n2 = listOfNodes.get(in2);
      if (!first.equals(n2)) {
        if (result[1] == null && inWindow(first, n2)) {
          result[0] = first;
          result[1] = n2;
        }

        for (int in3 = in2 + 1; in3 < listOfNodes.size(); in3++) {
          DatanodeDescriptor n3 = listOfNodes.get(in3);
          if (!first.equals(n3)
              && inWindow(first, n3, n2)) {
            result[0] = first;
            result[1] = n2;
            result[2] = n3;
            return;
          }
        }
      }
    }
  }
1131154
function first(FIRST, rule) {
  var terminals = new Set();
  var read = true;
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    for (var _iterator = rule[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var x = _step.value;
      if (!read) break;
      read = false;

      if (x.type === 'leaf') {
        terminals.add(x.terminal);
        break;
      }

      (0, _util.setaddall)(terminals, (0, _jsItertools.filter)(function (y) {
        return y !== _grammar.EW;
      }, FIRST.get(x.nonterminal)));
      read |= (0, _jsItertools.any)((0, _jsItertools.map)(function (y) {
        return y === _grammar.EW;
      }, FIRST.get(x.nonterminal)));
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return != null) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }

  if (read) terminals.add(_grammar.EW);
  return terminals;
}
983169
@SuppressWarnings("unchecked")
    public static <T> ReactiveSeq<T> takeUntil(final Stream<T> stream, final Predicate<? super T> predicate) {
        final Iterator<T> it = stream.iterator();

        class LimitUntil implements Iterator<T> {
            T next = (T) NULL;
            boolean test = false;

            void test() {
                if (!test && next == NULL && it.hasNext()) {
                    next = it.next();

                    if (test = predicate.test(next)) {
                        next = (T) NULL;
                        close(it); // need to close any open queues
                    }
                }
            }

            @Override
            public boolean hasNext() {
                test();
                return next != NULL;
            }

            @Override
            public T next() {
                if (next == NULL)
                    throw new NoSuchElementException();

                try {
                    return next;
                } finally {
                    next = (T) NULL;
                }
            }
        }

        return ReactiveSeq.fromIterator(new LimitUntil())
                  .onClose(() -> {
                      stream.close();
                  });
    }
1127491
public static <T> IteratorFromReaderFactory<T> getFactory(String delim, Function<String,T> op) {
    return new DelimitRegExIteratorFactory<T>(delim, op);
  }
1259394
static DoubleStream stream(
        DoubleTuple tuple, int startInclusive, int endExclusive) 
    {
        DoubleTupleSpliterator doubleTupleSpliterator = 
            new DoubleTupleSpliterator(
                tuple, startInclusive, endExclusive);
        return StreamSupport.doubleStream(doubleTupleSpliterator, false);
    }