network.oxalis.as4.util.GeneralUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oxalis-as4 Show documentation
Show all versions of oxalis-as4 Show documentation
Extension adding AS4 support to Oxalis
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);
}
}