Last active
December 16, 2015 03:09
-
-
Save chris-martin/5367445 to your computer and use it in GitHub Desktop.
My summary of the methods defined in http://hg.openjdk.java.net/lambda/lambda/jdk/file/tip/src/share/classes/java/util/Optional.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Optional<T> { | |
T get(); | |
boolean isPresent(); | |
void ifPresent(Consumer<? super T> consumer); | |
T orElse(T other); | |
T orElseGet(Supplier<? extends T> other); | |
<X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment