< prev index next >

src/java.base/share/classes/java/util/function/Consumer.java

Print this page

        

@@ -20,11 +20,11 @@
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-package java.util.function;
+package javany.util.function;
 
 import java.util.Objects;
 
 /**
  * Represents an operation that accepts a single input argument and returns no

@@ -37,11 +37,11 @@
  * @param <T> the type of the input to the operation
  *
  * @since 1.8
  */
 @FunctionalInterface
-public interface Consumer<T> {
+public interface Consumer<any T> {
 
     /**
      * Performs this operation on the given argument.
      *
      * @param t the input argument

@@ -58,10 +58,10 @@
      * @param after the operation to perform after this operation
      * @return a composed {@code Consumer} that performs in sequence this
      * operation followed by the {@code after} operation
      * @throws NullPointerException if {@code after} is null
      */
-    default Consumer<T> andThen(Consumer<? super T> after) {
+    default Consumer<T> andThen(Consumer<T> after) {
         Objects.requireNonNull(after);
         return (T t) -> { accept(t); after.accept(t); };
     }
 }
< prev index next >