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

Print this page
rev 6137 : 8004015: Add Extends and deaults for basic functional interface types
Summary: Adds the appropriate extends and default methods for  core functional interfaces used by the JSR335 libraries.
Reviewed-by: duke

@@ -30,11 +30,14 @@
  * <p/>This is the primitive type specialization of {@link Supplier} for
  * {@code double} and also may be used as a {@code Supplier<Double>}.
  *
  * @since 1.8
  */
-public interface DoubleSupplier {
+public interface DoubleSupplier extends Supplier<Double> {
+
+    @Override
+    public default Double get() { return getAsDouble(); }
 
     /**
      * Returns a {@code double} value.
      *
      * @return a {@code double} value