checking a new container recursively: only called if container was modified through addItem Simple object orange weighs 1 Simple object pencil weighs 1 checking a new container recursively: only called if container was modified through addItem checking a new container recursively: only called if container was modified through addItem Simple object kiwi weighs 1 Container Container 3 weighs 1 Simple object apple weighs 1 Container Container 2 weighs 2 Container Container 1 weighs 4 done with Container c1 ========================= checking a new container recursively: only called if container was modified through addItem cached value used cached value used cached value used Simple object banana weighs 1 Container Container 1 weighs 5 done with Container c1 =========================