
org.apache.tinkerpop.gremlin.orientdb.StreamUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orientdb-gremlin Show documentation
Show all versions of orientdb-gremlin Show documentation
TinkerPop3 Graph Structure Implementation for OrientDB
package org.apache.tinkerpop.gremlin.orientdb;
import static com.google.common.collect.Lists.newArrayList;
import java.util.Iterator;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
public class StreamUtils {
public static Stream asStream(Iterator sourceIterator) {
return asStream(sourceIterator, false);
}
public static Stream asStream(Iterator sourceIterator, boolean parallel) {
Iterable iterable = () -> sourceIterator;
return StreamSupport.stream(iterable.spliterator(), parallel);
}
public static Stream asStream(String[] fieldNames) {
return newArrayList(fieldNames).stream();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy