private boolean shouldFetch(int childIndex) { return childIndex >= this.getSize() && childIndex < children.count(); }
public void displayChildren(Children children) { this.children = children; set(children.getChildrenAndImages()); selectChild(); }
public void addChild() { int childIndex = childIndexToBeFetched(); if (shouldFetch(childIndex)) { insert(childIndex, children.getImagePairAt(childIndex)); } }