/** * Locate the element with the given index relative to the * offset of the parent of this node. */ internal AVLNode get(int index) { int indexRelativeToMe = index - relativePosition; if (indexRelativeToMe == 0) { return(this); } AVLNode nextNode = ((indexRelativeToMe < 0) ? getLeftSubTree() : getRightSubTree()); if (nextNode == null) { return(null); } return(nextNode.get(indexRelativeToMe)); }