code: public static <T> Choice<T> fromOptional(Optional<T> optional) {
      return optional.isPresent() ? of(optional.get()) : Choice.<T>none();
    }
docs: Returns a choice of the optional value, if it is present, or the empty choice if it is absent.