Package org.aksw.commons.util.traverse
Class BreadthFirstSearchLib
- java.lang.Object
-
- org.aksw.commons.util.traverse.BreadthFirstSearchLib
-
public class BreadthFirstSearchLib extends Object
-
-
Constructor Summary
Constructors Constructor Description BreadthFirstSearchLib()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,C extends Collection<T>>
java.util.stream.Stream<C>stream(C current, java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends T>> successorFn, java.util.function.Supplier<? extends java.util.stream.Collector<T,?,C>> collectorSupplier)For a given collection of nodes return the collection of successors w.r.t.
-
-
-
Method Detail
-
stream
public static <T,C extends Collection<T>> java.util.stream.Stream<C> stream(C current, java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends T>> successorFn, java.util.function.Supplier<? extends java.util.stream.Collector<T,?,C>> collectorSupplier)
For a given collection of nodes return the collection of successors w.r.t. sucessorFn. The successor function can be used to filter items..- Type Parameters:
T-C-- Parameters:
current-successorFn-collectorSupplier-- Returns:
-
-