@@ -0,0 +1,1682 @@
+/**%0A *%0A * Copyright (c) 2006-2016, Speedment, Inc. All Rights Reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); You may not%0A * use this file except in compliance with the License. You may obtain a copy of%0A * the License at:%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and limitations under%0A * the License.%0A */%0Apackage com.speedment.common.mutablestream.internal.source;%0A%0Aimport com.speedment.common.mutablestream.HasNext;%0Aimport com.speedment.common.mutablestream.action.Action;%0Aimport com.speedment.common.mutablestream.terminate.Terminator;%0Aimport static java.util.Objects.requireNonNull;%0Aimport java.util.stream.BaseStream;%0A%0A/**%0A *%0A * @param %3CT%3E  the streamed type (or wrapper)%0A * @param %3CTS%3E the stream type%0A * %0A * @author Emil Forslund%0A * @since  1.0.0%0A */%0Apublic final class WrappedStream%3CT, TS extends BaseStream%3CT, TS%3E%3E %0Aimplements HasNext%3CT, TS%3E %7B%0A%0A    private final TS wrapped;%0A%0A    public WrappedStream(TS wrapped) %7B%0A        this.wrapped = requireNonNull(wrapped);%0A    %7D%0A%0A    @Override%0A    public %3CQ, QS extends BaseStream%3CQ, QS%3E%3E HasNext%3CQ, QS%3E %0A    append(Action%3CT, TS, Q, QS%3E next) %7B%0A        return next;%0A    %7D%0A%0A    @Override%0A    public %3CX%3E X execute(Terminator%3CT, TS, X%3E terminator) %7B%0A        return terminator.execute();%0A    %7D%0A%0A    @Override%0A    public TS build(boolean parallel) %7B%0A        return parallel ? wrapped.parallel() : wrapped;%0A    %7D%0A%7D

Add source that wraps an existing stream