
com.github.dynodao.processor.util.StreamUtil Maven / Gradle / Ivy
package com.github.dynodao.processor.util;
import lombok.experimental.UtilityClass;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Spliterator;
import java.util.stream.Collector;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import static java.util.stream.Collectors.toCollection;
/**
* Utility methods for basic stream operations.
*/
@UtilityClass
public class StreamUtil {
/**
* Concatenates all of the objects into a single stream. If the passed object is a stream or collection, then
* it is flattened into the returned stream.
* @param objects the objects, or collections to be in the stream
* @return the flattened single stream
*/
@SuppressWarnings("unchecked")
public static Stream
© 2015 - 2025 Weber Informatics LLC | Privacy Policy