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

Print this page
rev 7047 : 8004015: Additional static and instance utils for functional interfaces.
Reviewed-by: briangoetz


  23  * questions.
  24  */
  25 package java.util.function;
  26 
  27 /**
  28  * A supplier of objects. The result objects are either created during the
  29  * invocation of {@link #get} or by some prior action.
  30  *
  31  * @param <T> The type of objects returned by {@code get}
  32  *
  33  * @since 1.8
  34  */
  35 @FunctionalInterface
  36 public interface Supplier<T> {
  37 
  38     /**
  39      * Returns an object.
  40      *
  41      * @return an object
  42      */
  43     public T get();
  44 }


  23  * questions.
  24  */
  25 package java.util.function;
  26 
  27 /**
  28  * A supplier of objects. The result objects are either created during the
  29  * invocation of {@link #get} or by some prior action.
  30  *
  31  * @param <T> The type of objects returned by {@code get}
  32  *
  33  * @since 1.8
  34  */
  35 @FunctionalInterface
  36 public interface Supplier<T> {
  37 
  38     /**
  39      * Returns an object.
  40      *
  41      * @return an object
  42      */
  43     T get();
  44 }