public TraceNode swap(TraceNode other) {
        TraceNode parent = this.parent;
        this.parent = other.parent;
        other.parent = parent;

        boolean strict = this.strict;
        this.strict = other.strict;
        other.strict = strict;

        String note = this.note;
        this.note = other.note;
        other.note = note;

        List<TraceNode> children = this.children;
        this.children = other.children;
        for (TraceNode child : this.children) {
            child.parent = this;
        }
        other.children = children;
        for (TraceNode child : other.children) {
            child.parent = other;
        }

        return this;
    }
Swap the internals of this tree with another.

@param other The tree to swap internals with.
@return This, to allow chaining.
messagebus/src/main/java/com/yahoo/messagebus/TraceNode.java