samples/erasure/src-api1.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.v1
    10     public static boolean arePositive(Collection<? extends Integer> numbers) {
    11         for (Integer n : numbers) {
    12             if (n <= 0) {
    13                 return false;
    14             }
    15         }
    16         return true;
    17     }
    18     // END: variance.erasure.v1
    19 }