int changeSize = map.changeSize();
if (endSize == 0 && changeSize == 0) {
boundary.setEmpty(true);
} else {
for (int i = 0; i < endSize; i++) {
boundary.addEnd(map.getEndKey(i));
}
for (int i = 0; i < changeSize; i++) {
boundary.addChange(createKeyValueUpdate(map.getChangeKey(i),
map.getOldValue(i), map.getNewValue(i)));
}