src/share/classes/java/util/Optional.java

Print this page
rev 7727 : 8020539: Clean up doclint problems in java.util package, part 2
Summary: Clean up doclint errors and warnings in classes in java.util
Reviewed-by: darcy,chegar
Contributed-by: Brian Burkhalter <brian.burkhalter@oracle.com>

@@ -91,10 +91,11 @@
     }
 
     /**
      * Returns an {@code Optional} with the specified present non-null value.
      *
+     * @param <T> the class of the value
      * @param value the value to be present, which must be non-null
      * @return an {@code Optional} with the value present
      */
     public static <T> Optional<T> of(T value) {
         return new Optional<>(value);

@@ -102,10 +103,11 @@
 
     /**
      * Returns an {@code Optional} describing the specified value, if non-null,
      * otherwise returns an empty {@code Optional}.
      *
+     * @param <T> the class of the value
      * @param value the possibly-null value to describe
      * @return an {@code Optional} with a present value if the specified value
      * is non-null, otherwise an empty {@code Optional}
      */
     public static <T> Optional<T> ofNullable(T value) {