Package science.aist.gtf.graph.builder
Interface EdgeBuilder<V,E>
-
- Type Parameters:
V
- the type of the decorated vertex valueE
- the type of the decorated edge value
public interface EdgeBuilder<V,E>
Edge Builder is used inside the
GraphBuilder
and is responsible to create a fluent way on how to create an edge between two vertices- Since:
- 1.0
- Author:
- Andreas Pointner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphBuilder<V,E>
to(V value)
Create an edge to the vertex that decorates value.GraphBuilder<V,E>
toByKey(Object key)
Creates an edge to the vertex that is identified by the key.EdgeDataBuilder<V,E>
toData(V value)
Creates an edge to the vertex that decorates value and returns anEdgeDataBuilder
that allows to add a value to the created edge.EdgeDataBuilder<V,E>
toDataByKey(Object key)
Creates an edge to the vertex that is identified by the key and returns anEdgeDataBuilder
that allows to add a value to the created edge.EdgeWithBuilder<V,E>
toWith(V value)
Creates an edge to the vertex that decorates value and returns anEdgeWithBuilder
that allows to add a callback method, that is called with the created edge.EdgeWithBuilder<V,E>
toWithByKey(Object key)
Creates an edge to the vertex that is identified by the key and returns anEdgeWithBuilder
that allows to add a callback method, that is called with the created edge.
-
-
-
Method Detail
-
to
GraphBuilder<V,E> to(V value)
Create an edge to the vertex that decorates value.- Parameters:
value
- the value of the decorated vertex- Returns:
- the graph original graph builder
-
toByKey
GraphBuilder<V,E> toByKey(Object key)
Creates an edge to the vertex that is identified by the key.- Parameters:
key
- the key which identifies the vertex- Returns:
- the graph original graph builder
- Throws:
IllegalStateException
- if no vertex with given key was found
-
toData
EdgeDataBuilder<V,E> toData(V value)
Creates an edge to the vertex that decorates value and returns anEdgeDataBuilder
that allows to add a value to the created edge.- Parameters:
value
- the value of the decorated vertex- Returns:
- a
EdgeDataBuilder
-
toDataByKey
EdgeDataBuilder<V,E> toDataByKey(Object key)
Creates an edge to the vertex that is identified by the key and returns anEdgeDataBuilder
that allows to add a value to the created edge.- Parameters:
key
- the key which identifies the vertex- Returns:
- a
EdgeDataBuilder
- Throws:
IllegalStateException
- if no vertex with given key was found
-
toWith
EdgeWithBuilder<V,E> toWith(V value)
Creates an edge to the vertex that decorates value and returns anEdgeWithBuilder
that allows to add a callback method, that is called with the created edge. This allows to e.g. addMetaTag
s.- Parameters:
value
- the value of the decorated vertex- Returns:
- a
EdgeWithBuilder
-
toWithByKey
EdgeWithBuilder<V,E> toWithByKey(Object key)
Creates an edge to the vertex that is identified by the key and returns anEdgeWithBuilder
that allows to add a callback method, that is called with the created edge. This allows to e.g. addMetaTag
s.- Parameters:
key
- the key which identifies the vertex- Returns:
- a
EdgeWithBuilder
- Throws:
IllegalStateException
- if no vertex with given key was found
-
-