4 ms·
The existing methods orElse(defaultValue) and orElseGet(supplier) and orElseThrow(exception) should be enough to cover everything get() does. But the Java comm
by redcodenl 10y ago
The existing methods orElse(defaultValue) and orElseGet(supplier) and orElseThrow(exception) should be enough to cover everything get() does.
But the Java community should move towards ifPresent/map/filter/flatMap etc.