if(this.orderCorrectionType == OrderCorrectionType.READ || this.orderCorrectionType == OrderCorrectionType.READ_WRITE) {
// pair each element with its order index
List<IndexedObject> indexedElements = new ArrayList(size);
for(int i=0; i < size; i++) {
indexedElements.add(new IndexedObject(orderList.get(i), elements.get(i)));
}
// put elements in order and add to container
((List)container).addAll(correctOrderList(indexedElements));