samples/erasure/src-api1.0/api/Erasure.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 03 Apr 2020 16:32:36 +0200
changeset 416 9ed8788a1a4e
parent 380 a2e90b86638a
permissions -rw-r--r--
Using HTTPS to download the libraries
     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 }