code: @Override
  	public ExtendedSet<T> headSet(T toElement) {
  		if (elements instanceof SortedSet<?>) {
  			GenericExtendedSet<T> c = empty();
  			c.elements = ((SortedSet<T>) elements).headSet(toElement);
  			return c;
  		}
  		return super.headSet(toElement);
  	}
docs: {@inheritDoc}