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-- |
jtulach@8 | 1 |
package api; |
jtulach@8 | 2 |
|
jtulach@390 | 3 |
import java.util.Collection; |
jtulach@380 | 4 |
|
jtulach@380 | 5 |
public class Erasure { |
jtulach@380 | 6 |
private Erasure() { |
jtulach@8 | 7 |
} |
jtulach@8 | 8 |
|
jtulach@380 | 9 |
// BEGIN: variance.erasure.v1 |
jtulach@390 | 10 |
public static boolean arePositive(Collection<? extends Integer> numbers) { |
jtulach@380 | 11 |
for (Integer n : numbers) { |
jtulach@380 | 12 |
if (n <= 0) { |
jtulach@380 | 13 |
return false; |
jtulach@380 | 14 |
} |
jtulach@380 | 15 |
} |
jtulach@380 | 16 |
return true; |
jtulach@378 | 17 |
} |
jtulach@380 | 18 |
// END: variance.erasure.v1 |
jtulach@8 | 19 |
} |