// a new version, not restoring a node, in which case the iterator will be in order (or
// you can just walk all the way back). So if there are performance problems with looking
// at lots of historical versions, look at this nasty bit of code.
List<TableDataRow> result = new ArrayList<TableDataRow>();
while (it.hasNext()) {
VersionableItem historical = (VersionableItem) it.next();
long versionNumber = historical.getVersionNumber();
if (isHistory(item,
versionNumber)) {
result.add(createHistoricalRow(historical));
}
}