for (int i= fEdits.size() - 1; i >= 0; i--) {
nodes[i]= TextEditNode.create((TextEdit)fEdits.get(i));
}
fNumberOfNodes= nodes.length;
Arrays.sort(nodes, new TextEditNodeComparator());
RootNode root= new RootNode(fBuffer.getLength());
for (int i= 0; i < nodes.length; i++) {
root.add(nodes[i]);
}
return root;
}