author | Jaroslav Tulach <jtulach@netbeans.org> |
Tue, 18 Oct 2011 07:10:23 +0200 | |
changeset 380 | a2e90b86638a |
parent 379 | samples/contravariance/src-impl/test/ContravarianceTest.java@b632733724a8 |
child 381 | 2f1f4e63662e |
permissions | -rw-r--r-- |
jtulach@378 | 1 |
package test; |
jtulach@8 | 2 |
|
jtulach@380 | 3 |
import api.Erasure; |
jtulach@380 | 4 |
import java.util.Set; |
jtulach@380 | 5 |
import java.util.TreeSet; |
jtulach@378 | 6 |
|
jtulach@380 | 7 |
public class ErasureTest { |
jtulach@380 | 8 |
// BEGIN: variance.erasure.test |
jtulach@378 | 9 |
public static void main(String[] args) { |
jtulach@380 | 10 |
Set<Integer> oneToTen = new TreeSet<Integer>(); |
jtulach@380 | 11 |
for (int i = 1; i <= 10; i++) { |
jtulach@380 | 12 |
oneToTen.add(i); |
jtulach@380 | 13 |
} |
jtulach@380 | 14 |
|
jtulach@380 | 15 |
boolean positive = Erasure.arePositive(oneToTen); |
jtulach@380 | 16 |
System.err.println("positive = " + positive); |
jtulach@380 | 17 |
assert positive : "The nubmers are positive: " + oneToTen; |
jtulach@8 | 18 |
} |
jtulach@380 | 19 |
// END: variance.erasure.test |
jtulach@8 | 20 |
} |