src/share/classes/java/util/function/Supplier.java

Print this page
rev 7675 : 8019840: Spec updates for java.util.function
Reviewed-by: mduigou
Contributed-by: brian.goetz@oracle.com

*** 23,44 **** * questions. */ package java.util.function; /** ! * A supplier of objects. The result objects are either created during the ! * invocation of {@link #get} or by some prior action. * ! * @param <T> The type of objects returned by {@code get} * * @since 1.8 */ @FunctionalInterface public interface Supplier<T> { /** ! * Returns an object. * ! * @return an object */ T get(); } --- 23,49 ---- * questions. */ package java.util.function; /** ! * Represents a supplier of results. * ! * <p>There is no requirement that a new or distinct result be returned each ! * time the supplier is invoked. ! * ! * <p>This is a <a href="package-summary.html">functional interface</a> ! * whose functional method is {@link #get()}. ! * ! * @param <T> the type of results supplied by this supplier * * @since 1.8 */ @FunctionalInterface public interface Supplier<T> { /** ! * Gets a result. * ! * @return a result */ T get(); }