org.eclipse.gef.graph

## Class Edge

- java.lang.Object
- - org.eclipse.gef.graph.Edge

All Implemented Interfaces:
  org.eclipse.gef.common.attributes.IAttributeStore

    public class Edge
    extends Object
    implements org.eclipse.gef.common.attributes.IAttributeStore

An `Edge` represents a (directed) connection between two `Node`s in a `Graph`.

### Property Summary

All Methods Instance Methods Concrete Methods
`javafx.beans.property.ReadOnlyMapProperty<String,Object>` `attributes`

### Nested Class Summary

Nested Classes
`static class` `Edge.Builder` The `Edge.Builder` can be used to construct an `Edge` little by little.

### Field Summary

### Fields inherited from interface org.eclipse.gef.common.attributes.IAttributeStore

`ATTRIBUTES_PROPERTY`

### Constructor Summary

Constructors
Constructor and Description
`Edge(Map<String,Object> attributes, Node source, Node target)` Constructs a new `Edge` which connects the given source `Node` with the given target `Node`.
`Edge(Node source, Node target)` Constructs a new `Edge` which connects the given source `Node` with the given target `Node`.

### Method Summary

All Methods Instance Methods Concrete Methods
`javafx.beans.property.ReadOnlyMapProperty<String,Object>` `attributesProperty()`
`javafx.collections.ObservableMap<String,Object>` `getAttributes()` Gets the value of the property attributes.
`Graph` `getGraph()` Returns the `Graph` to which this `Edge` belongs.
`Node` `getSource()` Returns the source `Node` of this `Edge`.
`Node` `getTarget()` Returns the target `Node` of this `Edge`.
`void` `setSource(Node source)` Sets the source `Node` of this `Edge` to the given value.
`void` `setTarget(Node target)` Sets the target `Node` of this `Edge` to the given value.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Property Detail

#### attributes

    public javafx.beans.property.ReadOnlyMapProperty<String,Object> attributesProperty

Specified by:
  `attributesProperty` in interface `org.eclipse.gef.common.attributes.IAttributeStore`
See Also:
  `getAttributes()`

### Constructor Detail

#### Edge

    public Edge(Map<String,Object> attributes,
                Node source,
                Node target)

Constructs a new `Edge` which connects the given source `Node` with the given target `Node`. The given attributesProperty are copied into the `attributesProperty map` of this `Edge` .

Parameters:
  `attributes` - A `Map` containing the attributesProperty which are copied into the `attributesProperty map` of this `Edge`.
  `source` - The source `Node` for this `Edge`.
  `target` - The target `Node` for this `Edge`.

#### Edge

    public Edge(Node source,
                Node target)

Constructs a new `Edge` which connects the given source `Node` with the given target `Node`.

Parameters:
  `source` - The source `Node` for this `Edge`.
  `target` - The target `Node` for this `Edge`.

### Method Detail

#### attributesProperty

    public javafx.beans.property.ReadOnlyMapProperty<String,Object> attributesProperty()

Specified by:
  `attributesProperty` in interface `org.eclipse.gef.common.attributes.IAttributeStore`
See Also:
  `getAttributes()`

#### getAttributes

    public javafx.collections.ObservableMap<String,Object> getAttributes()

Gets the value of the property attributes.

Specified by:
  `getAttributes` in interface `org.eclipse.gef.common.attributes.IAttributeStore`

#### getGraph

    public Graph getGraph()

Returns the `Graph` to which this `Edge` belongs.

Returns:
  The `Graph` to which this `Edge` belongs.

#### getSource

    public Node getSource()

Returns the source `Node` of this `Edge`.

Returns:
  The source `Node` of this `Edge`.

#### getTarget

    public Node getTarget()

Returns the target `Node` of this `Edge`.

Returns:
  The target `Node` of this `Edge`.

#### setSource

    public void setSource(Node source)

Sets the source `Node` of this `Edge` to the given value.

Parameters:
  `source` - The new source `Node` for this `Edge`.

#### setTarget

    public void setTarget(Node target)

Sets the target `Node` of this `Edge` to the given value.

Parameters:
  `target` - The new target `Node` for this `Edge`.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`