int count = 20;
long time=0, t1=0, t2 = 0;
String data = "SomeData_";
SortedArrayListBucket bucket = new SortedArrayListBucket();
for (int i=0; i<count; i+= 5) {
bucket.put(i, data + i);
}
for (int i=1; i<count; i+= 3) {
bucket.put(i, data + i);
}
for (int i=3; i<count; i+= 4) {
bucket.put(i, data + i);
}
for (int i=-23; i<count; i+= 4) {
bucket.put(i, data + i);
}
IntEntry entry = null;
Iterator iter = bucket.entryIterator();
while (iter.hasNext()) {
entry = (IntEntry) iter.next();
System.out.println(entry);
}
t1 = System.currentTimeMillis();
for (int i=0; i<1000000; i++) {
for (int j=-25; j<25; j++) {
bucket.get(j);
}
}
t2 = System.currentTimeMillis();
System.out.println("llist.remove(): " + ((t2 - t1) / 1000.0) + " seconds " + time);
//32.968