Package org.eclipse.gef.graph

# Class Node

java.lang.Object
org.eclipse.gef.graph.Node

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

public class Node extends Object implements org.eclipse.gef.common.attributes.IAttributeStore
A `Node` represents a vertex within a `Graph`.

## Property Summary

Properties
Type
Property
Description
`javafx.beans.property.ReadOnlyMapProperty<String,Object>`
`attributes`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`Node.Builder`
The `Node.Builder` can be used to construct a `Node` little by little.

## Field Summary

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

`ATTRIBUTES_PROPERTY`

## Constructor Summary

Constructors
Constructor
Description
`Node()`
Constructs a new `Node`.
`Node(Map<String,Object> attributes)`
Constructs a new `Node` and copies the given attributesProperty into the `attributesProperty map` of this `Node`.

## Method Summary

Modifier and Type
Method
Description
`javafx.beans.property.ReadOnlyMapProperty<String,Object>`
`attributesProperty()`
`Set<Edge>`
`getAllIncomingEdges()`
Returns all incoming `Edge`s of this `Node`.
`Set<Node>`
`getAllNeighbors()`
Returns all neighbors of this `Node`.
`Set<Edge>`
`getAllOutgoingEdges()`
Returns all outgoing `Edge`s of this `Node`.
`Set<Node>`
`getAllPredecessorNodes()`
Returns all predecessor `Node`s of this `Node`.
`Set<Node>`
`getAllSuccessorNodes()`
Returns all successor `Node`s of this `Node`.
`javafx.collections.ObservableMap<String,Object>`
`getAttributes()`
Gets the value of the property attributes.
`Graph`
`getGraph()`
Returns the `Graph` to which this `Node` belongs.
`Set<Edge>`
`getIncomingEdges()`
Returns the local incoming `Edge`s of this `Node`.
`Set<Node>`
`getNeighbors()`
Returns all (local) neighbors of this `Node`, i.e. the union of the `getPredecessorNodes()` and `getSuccessorNodes()` .
`Graph`
`getNestedGraph()`
Returns the `Graph` that is nested inside of this `Node`.
`Set<Edge>`
`getOutgoingEdges()`
Returns the local outgoing `Edge`s of this `Node`.
`Set<Node>`
`getPredecessorNodes()`
Returns the local predecessor `Node`s of this `Node`.
`Set<Node>`
`getSuccessorNodes()`
Returns the local successor `Node`s of this `Node`.
`void`
`setNestedGraph(Graph nestedGraph)`
Sets the `Graph` which is nested inside this `Node` to the given value.
`String`
`toString()`

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

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

## Property Details

### attributes

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

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

## Constructor Details

### Node

public Node()
Constructs a new `Node`.

### Node

public Node(Map<String,Object> attributes)
Constructs a new `Node` and copies the given attributesProperty into the `attributesProperty map` of this `Node`.

Parameters:
  `attributes` - A `Map` containing the attributesProperty which are copied into the `attributesProperty map` of this `Node`.

## Method Details

### attributesProperty

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

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

### getAllIncomingEdges

public Set<Edge> getAllIncomingEdges()
Returns all incoming `Edge`s of this `Node`. The full graph hierarchy is scanned for incoming edges, and not just the `associated graph`.

Returns:
  All incoming `Edge`s.

### getAllNeighbors

public Set<Node> getAllNeighbors()
Returns all neighbors of this `Node`. The full graph hierarchy is scanned for neighbors, and not just the `associated graph`.

Returns:
  All neighbors.

### getAllOutgoingEdges

public Set<Edge> getAllOutgoingEdges()
Returns all outgoing `Edge`s of this `Node`. The full graph hierarchy is scanned for outgoing edges, and not just the `associated graph`.

Returns:
  All outgoing `Edge`s.

### getAllPredecessorNodes

public Set<Node> getAllPredecessorNodes()
Returns all predecessor `Node`s of this `Node`. The full graph hierarchy is scanned for predecessor nodes, and not just the `associated graph`.

Returns:
  All predecessor `Node`s.

### getAllSuccessorNodes

public Set<Node> getAllSuccessorNodes()
Returns all successor `Node`s of this `Node`. The full graph hierarchy is scanned for successor nodes, and not just the `associated graph`.

Returns:
  All successor `Node`s.

### 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`
Property description:

### getGraph

public Graph getGraph()
Returns the `Graph` to which this `Node` belongs.

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

### getIncomingEdges

public Set<Edge> getIncomingEdges()
Returns the local incoming `Edge`s of this `Node`. Only the `associated graph` is scanned for incoming edges, and not the whole graph hierarchy.

Returns:
  The local incoming `Edge`s.

### getNeighbors

public Set<Node> getNeighbors()
Returns all (local) neighbors of this `Node`, i.e. the union of the `getPredecessorNodes()` and `getSuccessorNodes()` .

Returns:
  All (local) neighbors of this `Node`.

### getNestedGraph

public Graph getNestedGraph()
Returns the `Graph` that is nested inside of this `Node`. May be `null`.

Returns:
  The `Graph` that is nested inside of this `Node`, or `null`.

### getOutgoingEdges

public Set<Edge> getOutgoingEdges()
Returns the local outgoing `Edge`s of this `Node`. Only the `associated graph` is scanned for outgoing edges, and not the whole graph hierarchy.

Returns:
  The local outgoing `Edge`s.

### getPredecessorNodes

public Set<Node> getPredecessorNodes()
Returns the local predecessor `Node`s of this `Node`. Only the `associated graph` is scanned for predecessor nodes, and not the whole graph hierarchy.

Returns:
  The local predecessor `Node`s.

### getSuccessorNodes

public Set<Node> getSuccessorNodes()
Returns the local successor `Node`s of this `Node`. Only the `associated graph` is scanned for successor nodes, and not the whole graph hierarchy.

Returns:
  The local successor `Node`s.

### setNestedGraph

public void setNestedGraph(Graph nestedGraph)
Sets the `Graph` which is nested inside this `Node` to the given value.

Parameters:
  `nestedGraph` - The new nested `Graph` for this `Node`.

### toString

public String toString()

Overrides:
  `toString` in class `Object`