3 ms·
a) he doesn't propose to deprecate the semantics of get(), just change the name. b) get() is useful and less verbose for cases where other logic has proven tha
by hughw 11y ago
a) he doesn't propose to deprecate the semantics of get(), just change the name.
b) get() is useful and less verbose for cases where other logic has proven that the get() will succeed.
boolean allPresent = a.isPresent() && b.isPresent()
if (allPresent){
doSomething(a.get())
}
edit: just noticed this example is the same idea merb posted earlier.