boolean (final @NotNull String name, @NotNull Node<T> node) { final HashMap<String, Node<T>> childrenMap = node.myChildren; final boolean hasChildren = childrenMap != null && childrenMap.size() > 0; if (hasChildren || node.mappingExists()) { myCurrentNodePath.push(new PathElement<>(node, hasChildren ? childrenMap.keySet().iterator() : Collections.emptyIterator())); if (myCurrentNodePath.size() > 2) { // do not add separator before the Root and its direct child nodes myCurrentName.append(mySeparator); } myCurrentName.append(name); return true; } return false; }