/** * Expands the given item. * * @param item * the item to expand * @param position * the index of the item * @return range of rows added by expanding the item */ public Range expand(T item, Integer position) { if (doExpand(item) && position != null) { return Range.withLength(position + 1, (int) getHierarchy(item, false).count()); } return Range.emptyRange(); }