of<T> static method

Optional<T> of<T>(
  1. T? value
)

Implementation

static Optional<T> of<T>(final T? value) {
  return value != null ? Present(value) : Empty();
}