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

com.ardikars.common.util.CommonIterable Maven / Gradle / Ivy

The newest version!
/**
 * Copyright 2017-2019 the original author or authors.
 *
 * 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 com.ardikars.common.util;

/**
 * CommonIterable with custom iterator.
 * @param  emelent type.
 * @param  custom iterator type,
 */
@Deprecated
public interface CommonIterable> extends java.lang.Iterable {

    @Override
    U iterator();

    /**
     * Performs the given action for each element of the {@code Iterable}
     * until all elements have been processed or the action throws an
     * exception.  Unless otherwise specified by the implementing class,
     * actions are performed in the order of iteration (if an iteration order
     * is specified).  Exceptions thrown by the action are relayed to the
     * caller.
     *
     * 

The default implementation behaves as if: *

{@code
     *     for (T t : this)
     *         action.accept(t);
     * }
* * @param action The action to be performed for each element * @throws NullPointerException if the specified action is null * @since 1.2.7 */ void forEach(CommonConsumer action) throws NullPointerException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy