void (int index, int childId) { if (myJoinedChildrenList.size() == index) { myJoinedChildrenList.add(childId); } else { assert myJoinedChildrenList.get(index) == 0; myJoinedChildrenList.set(index, childId); } }