garydgregory commented on a change in pull request #74: Collections-699 PairingIterator URL: https://github.com/apache/commons-collections/pull/74#discussion_r300704572
########## File path: src/main/java/org/apache/commons/collections4/iterators/PairingIterator.java ########## @@ -0,0 +1,166 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.commons.collections4.iterators; + +import java.util.Iterator; +import java.util.NoSuchElementException; +import java.util.Objects; +import org.apache.commons.collections4.iterators.PairingIterator.Entry; + +/** + * Provides an iteration over the elements of two iterators. It will be return a + * {@link Entry} containing the child iterators elements. + * <p> + * Given two {@link Iterator} instances {@code A} and {@code B}. The + * {@link #next()} method will return a {@link Entry} with the elements of the + * {@code A} and {@code B} as values of the {@link Entry} until both iterators + * are exhausted. + * </p> + * <p> + * If one of the iterators is null, the result {@link Entry} contains also a + * null values until both child iterators exhausted. + * </p> + * <p> + * If one iterator has more elements then the other, the result {@link Entry} + * will contain a null value and the value of the not empty child iterator until + * both of the iterator exhausted. + * + * @param <F> type of first value. The first value of {@link Entry} + * Review comment: This blank line is not needed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
