public int computeCost(AnnotationBoundaryMap map) { int accu = 0; for (int i = 0; i < map.changeSize(); i++) { accu += objectOverhead + computeCost(map.getChangeKey(i)) + computeCostNullable(map.getOldValue(i)) + computeCostNullable(map.getNewValue(i)); } for (int i = 0; i < map.endSize(); i++) { accu += objectOverhead + computeCost(map.getEndKey(i)); } return accu; }