createHigherLevels method
Creates the levels higher than the given level
@param boundablesOfALevel the level to build on @param level the level of the Boundables, or -1 if the boundables are item boundables (that is, below level 0) @return the root, which may be a ParentNode or a LeafNode
Implementation
AbstractNode createHigherLevels(List boundablesOfALevel, int level) {
Assert.isTrue(!boundablesOfALevel.isEmpty);
List parentBoundables =
createParentBoundables(boundablesOfALevel, level + 1);
if (parentBoundables.length == 1) {
return parentBoundables[0] as AbstractNode;
}
return createHigherLevels(parentBoundables, level + 1);
}