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

network.oxalis.as4.util.GeneralUtils Maven / Gradle / Ivy

package network.oxalis.as4.util;

import lombok.experimental.UtilityClass;

import java.util.Iterator;
import java.util.Spliterators;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

@UtilityClass
public class GeneralUtils {

    public static  Stream iteratorToStreamOfUnknownSize(Iterator iterator, int characteristics, boolean parallel) {
        return StreamSupport.stream(
                Spliterators.spliteratorUnknownSize(iterator, characteristics),
                parallel);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy