I just found that OptionalInt
and OptionalLong
don't have map()
.
OptionalLong some() {
}
Optional<Something> doWithSome() {
some()
.map(find Something with the value)
.orElseGet(() -> Optional.of(new Something()));
}
Why?
I just found that OptionalInt
and OptionalLong
don't have map()
.
OptionalLong some() {
}
Optional<Something> doWithSome() {
some()
.map(find Something with the value)
.orElseGet(() -> Optional.of(new Something()));
}
Why?