void (@NotNull JsonSchemaTreeNode root, final @NotNull Processor<? super JsonSchemaTreeNode> processor) { final ArrayDeque<JsonSchemaTreeNode> queue = new ArrayDeque<>(root.getChildren()); while (!queue.isEmpty()) { final JsonSchemaTreeNode node = queue.removeFirst(); if (node.getChildren().isEmpty()) { if (!node.isNothing() && SchemaResolveState.normal.equals(node.getResolveState()) && !processor.process(node)) { break; } } else { queue.addAll(node.getChildren()); } } }