4 ms·
While the `Optional` API is generally pretty inconvenient (compared e.g. to Kotlin), it does offer the more precise `ifPresent`.
by loglog 11mo ago
While the `Optional` API is generally pretty inconvenient (compared e.g. to Kotlin), it does offer the more precise `ifPresent`.
- vbezhenar 11mo agoJava lambdas are terrible so I usually avoid them. There's no reason to invent new methods, when language already has corresponding statements.