com.happy3w.toolkits.pipe.IEasyPipe Maven / Gradle / Ivy
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