public interface Graph
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Edge> |
getEdges()
Return an unmodifiable view of all edges in this graph.
|
java.util.Collection<Vertex<? extends Oplet<?,?>,?,?>> |
getVertices()
Return an unmodifiable view of all vertices in this graph.
|
<N extends Oplet<C,P>,C,P> |
insert(N oplet,
int inputs,
int outputs)
Add a new unconnected
Vertex into the graph. |
void |
peekAll(Supplier<? extends Peek<?>> supplier,
Predicate<Vertex<?,?,?>> select)
Insert Peek oplets returned by the specified
Supplier into
the outputs of all of the oplets which satisfy the specified
Predicate . |
<N extends Oplet<C,P>,C,P> |
pipe(Connector<C> output,
N oplet)
|
<N extends Source<P>,P> |
source(N oplet)
|
<N extends Oplet<C,P>,C,P> Vertex<N,C,P> insert(N oplet, int inputs, int outputs)
Vertex
into the graph.
oplet
- the oplet to associate with the new vertexinputs
- the number of input connectors for the new vertexoutputs
- the number of output connectors for the new vertexVertex
for the oplet<N extends Source<P>,P> Connector<P> source(N oplet)
Vertex
associated with the
specified source Oplet
.
The Vertex
for the oplet has 0 input connectors and one output connector.
oplet
- the source oplet<N extends Oplet<C,P>,C,P> Connector<P> pipe(Connector<C> output, N oplet)
Vertex
associated with the
specified Oplet
.
The new Vertex
has one input and one output Connector
.
An Edge
is created connecting the specified output connector to
the new vertice's input connector.
output
- oplet
- the oplet to associate with the new Vertex
Vertex
void peekAll(Supplier<? extends Peek<?>> supplier, Predicate<Vertex<?,?,?>> select)
Supplier
into
the outputs of all of the oplets which satisfy the specified
Predicate
.supplier
- Function which provides a Peek oplet to insertselect
- Predicate to determine determines whether a Peek oplet will
be inserted on the outputs of the vertex passed as parameterjava.util.Collection<Vertex<? extends Oplet<?,?>,?,?>> getVertices()
java.util.Collection<Edge> getEdges()
Copyright IBM 2015,2016 - 2f6ad0e-20160307-0902