code: @SuppressWarnings("unchecked")
  	@Override
  	public int compareTo(ExtendedSet<T> o) {
  		Iterator<T> thisIterator = this.descendingIterator();
  		Iterator<T> otherIterator = o.descendingIterator();
  		while (thisIterator.hasNext() && otherIterator.hasNext()) {
  			T thisItem = thisIterator.next();
  			T otherItem = otherIterator.next();
  			int res = ((Comparable) thisItem).compareTo(otherItem);
  			if (res != 0)
  				return res;
  		}
  		return thisIterator.hasNext() ? 1 : (otherIterator.hasNext() ? -1 : 0);
  	}
docs: {@inheritDoc}