Package org.eclipse.gef.graph
Class Edge.Builder
java.lang.Object
org.eclipse.gef.graph.Edge.Builder
- Enclosing class:
- Edge
The 
Edge.Builder can be used to construct an Edge little by
 little.- 
Constructor SummaryConstructorsConstructorDescriptionBuilder(Graph.Builder.Context context, Object sourceNodeOrKey, Object targetNodeOrKey) Constructs a new (anonymous)Edge.Builderfor the givenGraph.Builder.Context.Constructs a new (anonymous) context-freeEdge.Builder, which can only be used to construct a single edge viabuildEdge(), i.e. which cannot be chained.
- 
Method SummaryModifier and TypeMethodDescriptionPuts the given key-value-pair into theattributesProperty mapof theEdgewhich is constructed by thisEdge.Builder.<T> Edge.Builderattr(BiConsumer<Edge, T> setter, T value) Uses the given setter to set the attribute value.build()Constructs a newGraphfrom the values which have been supplied to the builder chain.Creates a newEdge, setting the values specified via thisEdge.Builder.Constructs a newEdge.Builder.node()Constructs a new (anonymous)Node.Builderfor a node.Constructs a new (identifiable)Node.Builderfor a node.
- 
Constructor Details- 
BuilderConstructs a new (anonymous)Edge.Builderfor the givenGraph.Builder.Context.- Parameters:
- context- The context in which the- Edge.Builderis used.
- sourceNodeOrKey- The source- Nodeor a key to identify the source- Node(or its- Node.Builder).
- targetNodeOrKey- The target- Nodeor a key to identify the target- Node(or its- Node.Builder).
 
- 
BuilderConstructs a new (anonymous) context-freeEdge.Builder, which can only be used to construct a single edge viabuildEdge(), i.e. which cannot be chained.
 
- 
- 
Method Details- 
attrUses the given setter to set the attribute value.- Type Parameters:
- T- The attribute type.
- Parameters:
- setter- The setter to apply.
- value- The value to apply.
- Returns:
- thisfor convenience.
 
- 
attrPuts the given key-value-pair into theattributesProperty mapof theEdgewhich is constructed by thisEdge.Builder.- Parameters:
- key- The attribute name which is inserted.
- value- The attribute value which is inserted.
- Returns:
- thisfor convenience.
 
- 
buildConstructs a newGraphfrom the values which have been supplied to the builder chain.- Returns:
- A new Graph.
 
- 
buildEdgeCreates a newEdge, setting the values specified via thisEdge.Builder.- Returns:
- A newly created Edge.
 
- 
edgeConstructs a newEdge.Builder.- Parameters:
- sourceNodeOrKey- The source- Nodeor a key to identify the source- Node(or its- Node.Builder).
- targetNodeOrKey- The target- Nodeor a key to identify the target- Node(or its- Node.Builder).
- Returns:
- A new Edge.Builder.
 
- 
nodeConstructs a new (anonymous)Node.Builderfor a node.- Returns:
- A Node.Builder.
 
- 
nodeConstructs a new (identifiable)Node.Builderfor a node.- Parameters:
- key- The key that can be used to identify the- Node.Builder
- Returns:
- A Node.Builder.
 
 
-