summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-15 03:14:53 +0100
committerSven Gothel <[email protected]>2023-01-15 03:14:53 +0100
commit3818ed8cd00af3b145d9c95ca2287dc0a2d57957 (patch)
tree57afdaf0b935f95978be4aedf0a4c94ecd92fd61
parentc965bcf2b8cce8f81e2abc64b8960b653ddf5c00 (diff)
TestIteratorIndexCORE: Fix template usage
-rw-r--r--src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
index 8289587..70cb06b 100644
--- a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
+++ b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
@@ -45,7 +45,7 @@ public class TestIteratorIndexCORE extends SingletonJunitCase {
static int elems = 10;
static int loop = ( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) ? 20 : 9999999;
- public void populate(final List l, int len) {
+ public void populate(final List<Integer> l, int len) {
while(len>0) {
l.add(new Integer(len--));
}
@@ -54,12 +54,12 @@ public class TestIteratorIndexCORE extends SingletonJunitCase {
@Test
public void test01ArrayListIterator() {
int sum=0;
- final ArrayList l = new ArrayList();
+ final ArrayList<Integer> l = new ArrayList<Integer>();
populate(l, elems);
for(int j=loop; j>0; j--) {
- for(final Iterator iter = l.iterator(); iter.hasNext(); ) {
- final Integer i = (Integer)iter.next();
+ for(final Iterator<Integer> iter = l.iterator(); iter.hasNext(); ) {
+ final Integer i = iter.next();
sum+=i.intValue();
}
}
@@ -69,12 +69,12 @@ public class TestIteratorIndexCORE extends SingletonJunitCase {
@Test
public void test0ArrayListIndex() {
int sum=0;
- final ArrayList l = new ArrayList();
+ final ArrayList<Integer> l = new ArrayList<Integer>();
populate(l, elems);
for(int j=loop; j>0; j--) {
for(int k = 0; k < l.size(); k++) {
- final Integer i = (Integer)l.get(k);
+ final Integer i = l.get(k);
sum+=i.intValue();
}
}
@@ -84,12 +84,12 @@ public class TestIteratorIndexCORE extends SingletonJunitCase {
@Test
public void test01LinkedListListIterator() {
int sum=0;
- final LinkedList l = new LinkedList();
+ final LinkedList<Integer> l = new LinkedList<Integer>();
populate(l, elems);
for(int j=loop; j>0; j--) {
- for(final Iterator iter = l.iterator(); iter.hasNext(); ) {
- final Integer i = (Integer)iter.next();
+ for(final Iterator<Integer> iter = l.iterator(); iter.hasNext(); ) {
+ final Integer i = iter.next();
sum+=i.intValue();
}
}
@@ -99,12 +99,12 @@ public class TestIteratorIndexCORE extends SingletonJunitCase {
@Test
public void test01LinkedListListIndex() {
int sum=0;
- final LinkedList l = new LinkedList();
+ final LinkedList<Integer> l = new LinkedList<Integer>();
populate(l, elems);
for(int j=loop; j>0; j--) {
for(int k = 0; k < l.size(); k++) {
- final Integer i = (Integer)l.get(k);
+ final Integer i = l.get(k);
sum+=i.intValue();
}
}