M
Markus Innerebner
Hello @ all:
I implemented my data structure in a LinkedHashMap. Now I want to access
to the object i and from this position I want to scan sequentially the
hole LinkedHashMap.
I did this with an iterator, but I always start at the beginning of the
LinkedHashMap.
int COPOSCOUNTER = 250;
// _currentCO is the LinkedHashMap sorted by the attribute COPosition
Iterator it2 = _currentCO.values().iterator();
// try to arrive at the desired position
// Objekt is an objekt, which has the attribute COPosition
while (it2.hasNext() && ( (Objekt) it2.next()).getCOPosition() != minCOPOS - 1) {
// go to the next element
}
// arrived at position minCOPOS - 1
//..... sequantially scanning
thanks for helping me
Markus
I implemented my data structure in a LinkedHashMap. Now I want to access
to the object i and from this position I want to scan sequentially the
hole LinkedHashMap.
I did this with an iterator, but I always start at the beginning of the
LinkedHashMap.
int COPOSCOUNTER = 250;
// _currentCO is the LinkedHashMap sorted by the attribute COPosition
Iterator it2 = _currentCO.values().iterator();
// try to arrive at the desired position
// Objekt is an objekt, which has the attribute COPosition
while (it2.hasNext() && ( (Objekt) it2.next()).getCOPosition() != minCOPOS - 1) {
// go to the next element
}
// arrived at position minCOPOS - 1
//..... sequantially scanning
thanks for helping me
Markus