author | Jaroslav Tulach <jtulach@netbeans.org> |
Wed, 08 Aug 2012 22:25:24 +0200 | |
changeset 390 | a72eecb99952 |
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.v2 |
jtulach@390 | 10 |
public static boolean arePositive(Collection<? extends Number> numbers) { |
jtulach@380 | 11 |
for (Number n : numbers) { |
jtulach@380 | 12 |
if (n.doubleValue() <= 0.0d) { |
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.v2 |
jtulach@8 | 19 |
} |