@return the first match in document order, or null; stops at the first match
()
| 270 | * @return the first match in document order, or {@code null}; stops at the first match |
| 271 | */ |
| 272 | public T first() { |
| 273 | return findFirst().orElse(null); |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * Performs the given action for each match in document order. |