public final class Node
extends java.lang.Object
implements org.eclipse.gef4.common.properties.IPropertyChangeNotifier
Modifier and Type | Class and Description |
---|---|
static class |
Node.Builder
The
Node.Builder can be used to construct a Node little by
little. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTES_PROPERTY
The property name that is used to notify change listeners about changes
made to the attributes of this Node.
|
protected java.beans.PropertyChangeSupport |
pcs
The
PropertyChangeSupport which handles (un-)registration of
PropertyChangeListener s and firing of PropertyChangeEvent
s. |
Constructor and Description |
---|
Node()
Constructs a new
Node . |
Node(java.util.Map<java.lang.String,java.lang.Object> attrs)
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
boolean |
equals(java.lang.Object that) |
java.util.Set<? extends Edge> |
getAllIncomingEdges()
|
java.util.Set<Node> |
getAllNeighbors()
Returns all neighbors of this
Node . |
java.util.Set<? extends Edge> |
getAllOutgoingEdges()
|
java.util.Set<? extends Node> |
getAllPredecessorNodes()
|
java.util.Set<? extends Node> |
getAllSuccessorNodes()
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttrs()
Returns the attributes map of this
Node by reference. |
Graph |
getGraph()
|
java.util.Set<Edge> |
getLocalIncomingEdges()
|
java.util.Set<Node> |
getLocalNeighbors()
Returns all (local) neighbors of this
Node , i.e. the union of the
getLocalPredecessorNodes() and getLocalSuccessorNodes()
. |
java.util.Set<Edge> |
getLocalOutgoingEdges()
|
java.util.Set<Node> |
getLocalPredecessorNodes()
|
java.util.Set<Node> |
getLocalSuccessorNodes()
|
Graph |
getNestedGraph()
|
int |
hashCode() |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setGraph(Graph graph)
|
void |
setNestedGraph(Graph nestedGraph)
|
java.lang.String |
toString() |
public static final java.lang.String ATTRIBUTES_PROPERTY
Map<String, Object>
holding the old attributes and its
new value set to a Map<String, Object>
holding the new
attributes.protected java.beans.PropertyChangeSupport pcs
PropertyChangeSupport
which handles (un-)registration of
PropertyChangeListener
s and firing of PropertyChangeEvent
s.public Node()
Node
.public Node(java.util.Map<java.lang.String,java.lang.Object> attrs)
attrs
- A Map
containing the attributes which are copied into
the attributes map
of this Node
.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface org.eclipse.gef4.common.properties.IPropertyChangeNotifier
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public java.util.Set<? extends Edge> getAllIncomingEdges()
Edge
s of this Node
. The full graph
hierarchy is scanned for incoming edges, and not just the
associated graph
.Edge
s.public java.util.Set<Node> getAllNeighbors()
Node
. The full graph hierarchy is
scanned for neighbors, and not just the associated
graph
.public java.util.Set<? extends Edge> getAllOutgoingEdges()
Edge
s of this Node
. The full graph
hierarchy is scanned for outgoing edges, and not just the
associated graph
.Edge
s.public java.util.Set<? extends Node> getAllPredecessorNodes()
Node
s of this Node
. The full
graph hierarchy is scanned for predecessor nodes, and not just the
associated graph
.Node
s.public java.util.Set<? extends Node> getAllSuccessorNodes()
Node
s of this Node
. The full graph
hierarchy is scanned for successor nodes, and not just the
associated graph
.Node
s.public java.util.Map<java.lang.String,java.lang.Object> getAttrs()
Node
by reference. When this
map is changed, a PropertyChangeEvent
is fired for the
ATTRIBUTES_PROPERTY
.Node
by reference.public java.util.Set<Edge> getLocalIncomingEdges()
Edge
s of this Node
. Only the
associated graph
is scanned for incoming edges, and
not the whole graph hierarchy.Edge
s.public java.util.Set<Node> getLocalNeighbors()
Node
, i.e. the union of the
getLocalPredecessorNodes()
and getLocalSuccessorNodes()
.Node
.public java.util.Set<Edge> getLocalOutgoingEdges()
Edge
s of this Node
. Only the
associated graph
is scanned for outgoing edges, and
not the whole graph hierarchy.Edge
s.public java.util.Set<Node> getLocalPredecessorNodes()
Node
s of this Node
. Only
the associated graph
is scanned for predecessor
nodes, and not the whole graph hierarchy.Node
s.public java.util.Set<Node> getLocalSuccessorNodes()
Node
s of this Node
. Only the
associated graph
is scanned for successor nodes, and
not the whole graph hierarchy.Node
s.public Graph getNestedGraph()
public int hashCode()
hashCode
in class java.lang.Object
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface org.eclipse.gef4.common.properties.IPropertyChangeNotifier
public void setNestedGraph(Graph nestedGraph)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2014 itemis AG and others. All rights reserved.