Option implements Iterable<T>, Serializable { public @Nullable T getOrNull() { return value; } private  Option(@Nullable T value); @Override int hashCode(); @Override boolean equals(@Nullable Object to); @Override Iterator<T> iterator(); Option<T> filter(Predicate<T> predicate); Option<T> filterNot(Predicate<T> predicate); Option<R> map(Function<T, R> function); Option<R> flatMap(Function<T, Option<R>> function); @SafeVarargs final Option<R> match(Case<T, R>... cases); Option<T> peek(Consumer<T> consumer); Option<T> onEmpty(Runnable runnable); Option<T> orElse(T value); Option<T> orElse(Option<T> value); Option<T> orElse(Supplier<Option<T>> supplier); T orThrow(Supplier<E> exceptionSupplier); T orElseGet(T elseValue); T orElseGet(Supplier<T> supplier); @Nullable T getOrNull(); T get(); boolean isPresent(); boolean isDefined(); boolean isEmpty(); PandaStream<T> toStream(); Stream<T> toJavaStream(); Optional<T> toOptional(); static Option<T> none(); static Option<T> of(@Nullable T value); @SuppressWarnings({ "OptionalUsedAsFieldOrParameterType" }) static Option<T> ofOptional(Optional<T> optional); static Option<T> when(boolean flag, @Nullable T value); static Option<T> attempt(Class<E> exceptionType, ThrowingSupplier<T, E> supplier);  }
@Test void getOrNull() { Assertions.assertNull(Option.none().getOrNull()); }