*/
public void setComparator(Comparator<? super E> comparator) {
// save this comparator
this.comparator = comparator;
// keep the old trees to construct the reordering
SimpleTree previousSorted = sorted;
// create the sorted list with a simple comparator
final Comparator treeComparator;
if(comparator != null) treeComparator = new ElementComparator(comparator);
else treeComparator = new ElementRawOrderComparator();
sorted = new SimpleTree<Element>(treeComparator);