Return a new set which is the union of I{self} and I{other}.

        @param other: the other set
        @type other: Set object
        @rtype: the same type as I{self}
337404
def union(self, other):
        

        obj = self._clone()
        obj.union_update(other)
        return obj
574367
def issuperset(self, other):
        

        if not isinstance(other, Set):
            raise ValueError('other must be a Set instance')
        for item in other.items:
            if not item in self.items:
                return False
        return True
124955
def union_update(self, other):
        
        if not isinstance(other, Set):
            raise ValueError('other must be a Set instance')
        if self is other:
            return
        for item in other.items:
            self.add(item)
1041780
def union(other)
      raise Erlang::ImproperListError if improper?
      other = Erlang.from(other)
      raise ArgumentError, "other must be of Erlang::List type" if not Erlang.is_list(other)
      raise Erlang::ImproperListError if other.improper?
      items = ::Set.new
      return _uniq(items).append(other._uniq(items))
    end
323904
def difference_update(self, other):
        
        if not isinstance(other, Set):
            raise ValueError('other must be a Set instance')
        if self is other:
            self.items = []
        else:
            for item in other.items:
                self.discard(item)
297657
public void union(GeneralSubtrees other) {
        if (other != null) {
            for (int i = 0, n = other.size(); i < n; i++) {
                add(other.get(i));
            }
            // Minimize this
            minimize();
        }
    }
124848
function (other) {
        assertNotNull(other);

        if (this.count() === 0) {
            this.unionWith(other);
            return;
        }

        else if (other === this) {
            this.clear();
            return;
        }

        // If other is a HashSet, it has unique elements according to its equality comparer,
        // but if they're using different equality comparers, then assumption of uniqueness
        // will fail. So first check if other is a hashset using the same equality comparer;
        // symmetric except is a lot faster if we can assume uniqueness

        if (areEqualityComparersEqual(this, other)) {
            var table = this.table;

            forOf(other, function (element) {
                if (!table.remove(element)) {
                    table.add(element, null);
                }
            });
        }
        else {
            this.symmetricExceptWith(new HashSet(other, this.comparer));
        }
    }
1032926
def union(self, other, ignore_conflicts=False):
        """"""
        result = self.copy()
        result.union_update(other, ignore_conflicts)
        return result
315340
def intersection(self,other):
        
        if self.everything:
            if other.everything:
                return DiscreteSet()
            else:
                return DiscreteSet(other.elements)
        else:
            if other.everything:
                return DiscreteSet(self.elements)
            else:
                return DiscreteSet(self.elements.intersection(other.elements))
1302192
def intersection(other)
      if other.is_a?(AbsoluteSet) and other.universe.eql?(@universe)
        copy(:mask => @mask & other.mask)
      elsif other.is_a?(AbstractSet) and other.infinite?
        other.intersection(self)
      else
        copy(:mask => @mask & as_mask(other, false))
      end
    end
1180476
public static <T> Set<T> union(Collection<Set<T>> sets) {
		Set<T> result = new HashSet<>();
		if (sets.isEmpty()) {
			return result;
		}
		Iterator<Set<T>> iter = sets.iterator();
		result.addAll(iter.next());

		if (sets.size() == 1) {
			return result;
		}

		while (iter.hasNext()) {
			result.addAll(iter.next());
		}
		return result;
	}
1116573
def difference(self,other):
        
        res = IntervalSet.everything()
        for j in other.ints:
            tmp = []
            for i in self.ints:
                tmp.extend(i._difference(j))
            res = res.intersection(IntervalSet(tmp))
        return res
390359
def union(*sets, **kwargs):
    
    sets = _set_preprocess(sets, **kwargs)
    return as_index( _set_concatenate(sets), axis=0, base=True).unique
1102333
def union(self, *others, **kwargs):
        
        return self._combine_variant_collections(
            combine_fn=set.union,
            variant_collections=(self,) + others,
            kwargs=kwargs)
926878
@SafeVarargs
	public static <T> Collection<T> union(Collection<T> coll1, Collection<T> coll2, Collection<T>... otherColls) {
		Collection<T> union = union(coll1, coll2);
		for (Collection<T> coll : otherColls) {
			union = union(union, coll);
		}
		return union;
	}
1214436
public void union(final HLL other) {
        // TODO: verify HLLs are compatible
        final HLLType otherType = other.getType();

        if(type.equals(otherType)) {
            homogeneousUnion(other);
            return;
        } else {
            heterogenousUnion(other);
            return;
        }
    }
55371
public static <E> Set<E> unionView(final Set<? extends E> set1, final Set<? extends E> set2) {
		return Sets.union(set1, set2);
	}