Module java.base
Package java.util

# Class Optional

=
public final class Optional<T>
extends java.lang.Object

## Methods

- =
  public static <T> java.util.Optional<T> empty()
- =
  public boolean equals(java.lang.Object arg0)
- =
  public java.util.Optional<T> filter(java.util.function.Predicate<? super T> arg0)
- =
  public <U> java.util.Optional<U> flatMap(java.util.function.Function<? super T, ? extends java.util.Optional<? extends U>> arg0)
- =
  public T get()
- =
  public int hashCode()
- =
  public void ifPresent(java.util.function.Consumer<? super T> arg0)
- =
  public void ifPresentOrElse(java.util.function.Consumer<? super T> arg0, java.lang.Runnable arg1)
- =
  public boolean isEmpty()
- =
  public boolean isPresent()
- =
  public <U> java.util.Optional<U> map(java.util.function.Function<? super T, ? extends U> arg0)
- =
  public static <T> java.util.Optional<T> of(T arg0)
- =
  public static <T> java.util.Optional<T> ofNullable(T arg0)
- =
  public java.util.Optional<T> or(java.util.function.Supplier<? extends java.util.Optional<? extends T>> arg0)
- =
  public T orElse(T arg0)
- =
  public T orElseGet(java.util.function.Supplier<? extends T> arg0)
- =
  public T orElseThrow()
- =
  public <X> T orElseThrow(java.util.function.Supplier<? extends X> arg0) throws X
- =
  public java.util.stream.Stream<T> stream()
- =
  public java.lang.String toString()

## Summary

No differences.