@return the first match in document order, if any; stops at the first match
()
| 262 | * @return the first match in document order, if any; stops at the first match |
| 263 | */ |
| 264 | public Optional<T> findFirst() { |
| 265 | List<T> hits = run(true); |
| 266 | return hits.isEmpty() ? Optional.empty() : Optional.of(hits.get(0)); |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * @return the first match in document order, or {@code null}; stops at the first match |
no test coverage detected