N (N parent, String frame) { return parent.children.<caret>stream() .filter(child -> child.whatever.equals(frame)) .findAny() .orElseGet(() -> { N result = new N(parent, new ArrayList<>(), frame); parent.children.add(result); return result; }); }