samples/erasure/src-api2.0/api/Erasure.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
parent 380 a2e90b86638a
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
     1 package api;
     2 
     3 import java.util.Collection;
     4 
     5 public class Erasure {
     6     private Erasure() {
     7     }
     8 
     9     // BEGIN: variance.erasure.v2
    10     public static boolean arePositive(Collection<? extends Number> numbers) {
    11         for (Number n : numbers) {
    12             if (n.doubleValue() <= 0.0d) {
    13                 return false;
    14             }
    15         }
    16         return true;
    17     }
    18     // END: variance.erasure.v2
    19 }