/** * Recalculates real bag size. * * @return real size */ private int updateSize() { int size = 0; if (collectionPointer != null) { final OSBTreeBonsai<OIdentifiable, Integer> tree = loadTree(); try { size = tree.getRealBagSize(changes); } finally { releaseTree(); } } else { for (Change change : changes.values()) { size += change.applyTo(0); } } for (OModifiableInteger diff : newEntries.values()) { size += diff.getValue(); } this.size = size; return size; }
@Override public Collection<Object> values() { return configMap.values(); }