Creates a stream that is a union of this stream and other streams
        
        Args:
            streamSet: a set of Stream objects to merge with this stream
        Returns:
            Stream:
482265
def union(self, streamSet):
        
        if(not isinstance(streamSet,set)) :
            raise TypeError("The union operator parameter must be a set object")
        if(len(streamSet) == 0):
            return self        
        op = self.topology.graph.addOperator("$Union$")
        op.addInputPort(outputPort=self.oport)
        for stream in streamSet:
            op.addInputPort(outputPort=stream.oport)
        oport = op.addOutputPort(schema=self.oport.schema)
        return Stream(self.topology, oport)
1137924
def stream_parameters(streams, no_duplicates=True, exclude=['name']):
    
    param_groups = []
    for s in streams:
        if not s.contents and isinstance(s.hashkey, dict):
            param_groups.append(list(s.hashkey))
        else:
            param_groups.append(list(s.contents))
    names = [name for group in param_groups for name in group]

    if no_duplicates:
        clashes = sorted(set([n for n in names if names.count(n) > 1]))
        clash_streams = []
        for s in streams:
            for c in clashes:
                if c in s.contents or (not s.contents and isinstance(s.hashkey, dict) and c in s.hashkey):
                    clash_streams.append(s)
        if clashes:
            clashing = ', '.join([repr(c) for c in clash_streams[:-1]])
            raise Exception('The supplied stream objects %s and %s '
                            'clash on the following parameters: %r'
                            % (clashing, clash_streams[-1], clashes))
    return [name for name in names if name not in exclude]
444679
def create(self, set):
        
        target_url = self.client.get_url('SET', 'POST', 'create')
        r = self.client.request('POST', target_url, json=set._serialize())
        return set._deserialize(r.json(), self)
476164
protected MergingWindowSet<W> getMergingWindowSet() throws Exception {
		@SuppressWarnings("unchecked")
		MergingWindowAssigner<? super IN, W> mergingAssigner = (MergingWindowAssigner<? super IN, W>) windowAssigner;
		return new MergingWindowSet<>(mergingAssigner, mergingSetsState);
	}
1009048
def _combine_sets(self, sets, final_set):
        
        self.cls.get_connection().sinterstore(final_set, list(sets))
        return final_set
1013438
def union(self, other):
    

    # we only deal with the case of two lists here
    length1 = len(self)
    length2 = len(other)

    # initialize list of output segments
    ostart = -1
    seglist = []

    i1 = -1
    i2 = -1
    start1 = -1
    start2 = -1
    id = -1

    while 1:
      # if necessary, get a segment from list 1
      if start1 == -1:
        i1 += 1
        if i1 < length1:
          start1 = self[i1].start()
          stop1 = self[i1].end()
          id = self[i1].id()
        elif i2 == length2:
          break

      # if necessary, get a segment from list 2
      if start2 == -1:
        i2 += 1
        if i2 < length2:
          start2 = other[i2].start()
          stop2 = other[i2].end()
        elif i1 == length1:
          break

      # pick the earlier segment from the two lists
      if start1 > -1 and ( start2 == -1 or start1 <= start2):
        ustart = start1
        ustop = stop1
        # mark this segment has having been consumed
        start1 = -1
      elif start2 > -1:
        ustart = start2
        ustop = stop2
        # mark this segment has having been consumed
        start2 = -1
      else:
        break

      # if the output segment is blank, initialize it; otherwise, see
      # whether the new segment extends it or is disjoint
      if ostart == -1:
        ostart = ustart
        ostop = ustop
      elif ustart <= ostop:
        if ustop > ostop:
          # this extends the output segment
          ostop = ustop
        else:
          # This lies entirely within the current output segment
          pass
      else:
         # flush the current output segment, and replace it with the
         # new segment
         x = ScienceSegment(tuple([id,ostart,ostop,ostop-ostart]))
         seglist.append(x)
         ostart = ustart
         ostop = ustop

    # flush out the final output segment (if any)
    if ostart != -1:
      x = ScienceSegment(tuple([id,ostart,ostop,ostop-ostart]))
      seglist.append(x)

    self.__sci_segs = seglist
    return len(self)
133185
def union(self, other):
        
        if self._slideDuration != other._slideDuration:
            raise ValueError("the two DStream should have same slide duration")
        return self.transformWith(lambda a, b: a.union(b), other, True)
426015
public void unionWith(Multiset<O> multiset) throws ParameterException {
		Validate.notNull(multiset);
		for (O o : multiset.support()) {
			setMultiplicity(o, Math.max(multiplicity(o), multiset.multiplicity(o)));
		}
	}
1259394
static DoubleStream stream(
        DoubleTuple tuple, int startInclusive, int endExclusive) 
    {
        DoubleTupleSpliterator doubleTupleSpliterator = 
            new DoubleTupleSpliterator(
                tuple, startInclusive, endExclusive);
        return StreamSupport.doubleStream(doubleTupleSpliterator, false);
    }
1187476
public <T2> JoinedStreams<T, T2> join(DataStream<T2> otherStream) {
		return new JoinedStreams<>(this, otherStream);
	}
655556
public AsciiSet union(AsciiSet set) {
    final boolean[] unionMembers = new boolean[128];
    for (int i = 0; i < unionMembers.length; ++i) {
      unionMembers[i] = members[i] || set.members[i];
    }
    return new AsciiSet(unionMembers);
  }
435774
def union(self, *others):
        
        others = self._typesafe_others(others)
        return set(map(
            self._loads, self._client.sunion(self.key_prefix, *others)))
581623
public static void copyStreamWithFilterSet(final InputStream in, final OutputStream out, final FilterSet set)
        throws IOException {
        final BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out));
        String lSep = System.getProperty("line.separator");
        String line = reader.readLine();
        while (null != line) {
            writer.write(set.replaceTokens(line));
            writer.write(lSep);
            line = reader.readLine();
        }
        writer.flush();
    }
598969
public static <U> Stream<U> stream(final Iterable<U> it) {
        return StreamSupport.stream(it.spliterator(), false);
    }
204143
private TargetStream createStream(StreamSet streamSet,
                              int priority,
                              Reliability reliability) throws SIResourceException

  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "createStream",
        new Object[] { streamSet, Integer.valueOf(priority), reliability });

    TargetStream stream = null;

    if(reliability.compareTo(Reliability.BEST_EFFORT_NONPERSISTENT) <= 0)
    {
      stream = new ExpressTargetStream(deliverer,
        streamSet.getRemoteMEUuid(), streamSet.getStreamID());
    }
    else
    {
      //Warning - this assumes that ASSURED is always the highest Reliability
      //and that UNKNOWN is always the lowest (0).
      stream = new GuaranteedTargetStream(
                        deliverer,
                        upControl,
                        am,
                        streamSet,
                        priority, //priority
                        reliability, //reliability
                        new ArrayList(),
                        messageProcessor);
    }

    streamSet.setStream(priority, reliability, stream);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "createStream", stream);

    return stream;
  }
857139
def union(self, *iterables):
        
        return self.__class__(chain(iter(self), *iterables), key=self._key)
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;
	}