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

com.happy3w.toolkits.pipe.IEasyPipe Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package com.happy3w.toolkits.pipe;

import java.util.Collection;
import java.util.Iterator;
import java.util.stream.Stream;

public interface IEasyPipe {

    void flush();

    void accept(InType data);

    default void accept(Collection list) {
        for (InType d : list) {
            accept(d);
        }
    }

    default void accept(Iterator it) {
        while (it.hasNext()) {
            accept(it.next());
        }
    }

    default void accept(Stream stream) {
        accept(stream.iterator());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy