@Immutable @ThreadSafe public final class Optional<T> extends Object implements Serializable
public static <T> Optional<T> of(T value) throws NullPointerException
NullPointerException
- if the value is nullpublic static <T> Optional<T> ofNullable(T value)
public T orElse(T other)
other
- public boolean isPresent()
Copyright © 2015 The Apache Software Foundation. All rights reserved.