<commit_before>package org.mit.jstreamit;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * TODO: pipelines are not compile-time type-safe!
 *
 * Programmers building a stream graph can either create instances of Pipeline
 * for one-off pipelines, or create subclasses of Pipeline that create and pass
 * SteamElement instances to the superclass constructor.
 * @author <NAME> <<EMAIL>>
 * @since 11/7/2012
 */
public class Pipeline<I, O> implements StreamElement<I, O> {
	private final List<StreamElement<?, ?>> elements;
	public Pipeline(StreamElement<?, ?>... elements) {
		this.elements = new ArrayList<>(Arrays.asList(elements));
	}
	public Pipeline(List<StreamElement<?, ?>> elements) {
		this.elements = new ArrayList<>(elements);
	}

	public final void add(StreamElement<?, ?> first, StreamElement<?, ?>... more) {
		elements.add(first);
		elements.addAll(Arrays.asList(more));
	}
}<commit_msg>Pipeline(...) forwards to Pipeline(List)<commit_after>package org.mit.jstreamit;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * TODO: pipelines are not compile-time type-safe!
 *
 * Programmers building a stream graph can either create instances of Pipeline
 * for one-off pipelines, or create subclasses of Pipeline that create and pass
 * SteamElement instances to the superclass constructor.
 * @author <NAME> <<EMAIL>>
 * @since 11/7/2012
 */
public class Pipeline<I, O> implements StreamElement<I, O> {
	private final List<StreamElement<?, ?>> elements;
	public Pipeline(StreamElement<?, ?>... elements) {
		this(Arrays.asList(elements));
	}
	public Pipeline(List<StreamElement<?, ?>> elements) {
		this.elements = new ArrayList<>(elements);
	}

	public final void add(StreamElement<?, ?> first, StreamElement<?, ?>... more) {
		elements.add(first);
		elements.addAll(Arrays.asList(more));
	}
}
{'fraction_non_alphanumeric': 0.13927427961579508, 'fraction_numerical': 0.007470651013874066, 'mean_word_length': 4.914826498422713, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4608219', 'n_tokens_mistral': 582, 'n_tokens_neox': 563, 'n_words': 161}