All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.irlab.cartesianproduct.Iterator5 Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019 Information Retrieval Lab - University of A Coruña
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.irlab.cartesianproduct;

import org.jooq.lambda.tuple.Tuple4;
import org.jooq.lambda.tuple.Tuple5;

/**
 * Iterator for {@link Iterator5}
 *
 * @param  the type of the first element
 * @param  the type of the first element
 * @param  the type of the third element
 * @param  the type of the fourth element
 * @param  the type of the fifth element
 *
 * @author [email protected]
 */
final class Iterator5
        extends ProductIterator, E5, Tuple5> {

    /**
     * Creates a new instance.
     *
     * @param col1 the first collection
     * @param col2 the second collection
     * @param col3 the third collection
     * @param col4 the forth collection
     * @param col5 the fifth collection
     */
    Iterator5(final Iterable col1, final Iterable col2, final Iterable col3,
            final Iterable col4, final Iterable col5) {
        super(() -> new Iterator4<>(col1, col2, col3, col4), col5);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected Tuple5 join(final Tuple4 e1, final E5 e2) {
        return e1.concat(e2);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy