code: @SafeVarargs
    public static <T> @NonNull Optional<T> first(final @NonNull Optional<T>... optionals) {
      return Arrays.stream(optionals)
        .filter(Optional::isPresent)
        .findFirst()
        .orElse(Optional.empty());
    }
docs: Gets the first optional with a present value.
  
  @param optionals the optionals
  @param <T> the type
  @return an optional