1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/erasure/src-api2.0/api/Erasure.java Tue Oct 18 07:10:23 2011 +0200
1.3 @@ -0,0 +1,19 @@
1.4 +package api;
1.5 +
1.6 +import java.util.Set;
1.7 +
1.8 +public class Erasure {
1.9 + private Erasure() {
1.10 + }
1.11 +
1.12 + // BEGIN: variance.erasure.v2
1.13 + public static boolean arePositive(Set<? extends Number> numbers) {
1.14 + for (Number n : numbers) {
1.15 + if (n.doubleValue() <= 0.0d) {
1.16 + return false;
1.17 + }
1.18 + }
1.19 + return true;
1.20 + }
1.21 + // END: variance.erasure.v2
1.22 +}