@SuppressWarnings("unchecked")
 @Override
 public int compare(final ElementNode o1, final ElementNode o2) {
   return myDelegate.compare((T) o1.getDelegate(), (T) o2.getDelegate());
 }
 private void setSortComparator(Comparator<ElementNode> sortComparator) {
   if (myComparator.equals(sortComparator)) return;
   myComparator = sortComparator;
   doSort();
 }