/** * {@inheritDoc} */ @Override public boolean hasChildren(Object element) { InvocationTreeElement ite = InvocationTreeUtil.lookupTreeElement(lookupMap, element); if (ite == null) { return false; } return ite.hasChildren(); }
/** * Recursively iterating through the given {@link InvocationTreeElement} and its child elements * and sorting all child collections from each {@link InvocationTreeElement}. * * @param element * the {@link InvocationTreeElement} where the iteration is starting */ private void sortChildren(InvocationTreeElement element) { if (element.hasChildren()) { Collections.sort(element.getChildren()); element.getChildren().stream().forEach(this::sortChildren); } }