All pastes #820402 Raw Edit

Something

public text v1 · immutable
·published 2007-12-17 14:59 UTC
rendered paste body
  /**
   * Unions the list with argumented list.
   * @param set The list you want to union
   * @return The combined list
   * @ensure	this.union(set).size == this.size + set.size
   * @require set.size() != 0
   */
  @Override
  public Set<T> union(Set<T> set) {
	  Set<T> unionSet = this;
	int i = 0;
	while (i< set.size()){
		unionSet.add(set.get(i));
		i++;	
	}
	return unionSet;
  }