
com.lumiomedical.flow.impl.parallel.compiler.pass.RemoveNodesWithUpstreamPass Maven / Gradle / Ivy
package com.lumiomedical.flow.impl.parallel.compiler.pass;
import com.lumiomedical.flow.compiler.CompilationException;
import com.lumiomedical.flow.impl.pipeline.compiler.pass.PipelineCompilerPass;
import com.lumiomedical.flow.node.Node;
import java.util.Collection;
import java.util.stream.Collectors;
/**
* @author Pierre Lecerf ([email protected])
* Created on 2020/12/13
*/
public class RemoveNodesWithUpstreamPass implements PipelineCompilerPass
{
@Override
public Collection run(Collection nodes) throws CompilationException
{
return nodes.stream()
.filter(n -> n.getUpstream().isEmpty())
.collect(Collectors.toList())
;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy