}
List<Versioned<byte[]>> itemsToRemove =
new ArrayList<Versioned<byte[]>>(values.size());
for(Versioned<byte[]> versioned: values) {
Occurred occurred = value.getVersion().compare(versioned.getVersion());
if(occurred == Occurred.BEFORE) {
throw new ObsoleteVersionException("Obsolete version for key '" + key
+ "': " + value.getVersion());
} else if(occurred == Occurred.AFTER) {
itemsToRemove.add(versioned);