@@ -0,0 +1,2330 @@
+/*%0A * Copyright 2017, TeamDev Ltd. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.util;%0A%0Aimport javax.annotation.Nonnull;%0Aimport java.util.Iterator;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull;%0A%0A/**%0A * A factory of %7B@link Iterable%7D instances.%0A *%0A * @author Dmytro Dashenkov%0A */%0Apublic final class MoreIterables %7B%0A%0A    private MoreIterables() %7B%0A        // Prevent utility class instantiation.%0A    %7D%0A%0A    /**%0A     * Creates a new %7B@link Iterable%7D on top of the passed %7B@link Iterator%7D.%0A     *%0A     * %3Cp%3EThe resulting %7B@link Iterable%7D is guaranteed to return the given instance of%0A     * %7B@link Iterator%7D in response to %7B@link Iterable#iterator() Iterable.iterator()%7D call.%0A     *%0A     * @param iterator the backing iterator%0A     * @param %3CE%3E the type of the values of both the backing iterator and the resulting iterable.%0A     * @return new instance of %7B@link Iterable%7D.%0A     */%0A    public static %3CE%3E Iterable%3CE%3E onTopOf(Iterator%3CE%3E iterator) %7B%0A        return new DelegateIterable%3C%3E(checkNotNull(iterator));%0A    %7D%0A%0A    private static class DelegateIterable%3CE%3E implements Iterable%3CE%3E %7B%0A%0A        private final Iterator%3CE%3E iterator;%0A%0A        private DelegateIterable(Iterator%3CE%3E iterator) %7B%0A            this.iterator = iterator;%0A        %7D%0A%0A        @Nonnull%0A        @Override%0A        public Iterator%3CE%3E iterator() %7B%0A            return iterator;%0A        %7D%0A    %7D%0A%7D%0A

Add `MoreIterables`.