public final class Graph
extends java.lang.Object
implements org.eclipse.gef4.common.properties.IPropertyChangeNotifier
Modifier and Type | Class and Description |
---|---|
static class |
Graph.Builder
The
Graph.Builder can be used to construct a new Graph 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 Graph.
|
static java.lang.String |
EDGES_PROPERTY
The property name that is used to notify change listeners about
added/removed edges.
|
static java.lang.String |
NODES_PROPERTY
The property name that is used to notify change listeners about
added/removed nodes.
|
Constructor and Description |
---|
Graph()
Default constructor, using empty collections for attributes, nodes, and
edges.
|
Graph(java.util.Map<java.lang.String,java.lang.Object> attrs,
java.util.List<Node> nodes,
java.util.List<Edge> edges)
Constructs a new
Graph from the given attributes, nodes, and
edges. |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
boolean |
equals(java.lang.Object other) |
java.util.Map<java.lang.String,java.lang.Object> |
getAttrs()
Returns the map of attributes of this
Graph by reference. |
java.util.List<Edge> |
getEdges()
|
Node |
getNestingNode()
|
java.util.List<Node> |
getNodes()
|
int |
hashCode() |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setNestingNode(Node nestingNode)
|
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.public static final java.lang.String NODES_PROPERTY
List<Node>
holding the old
nodes and its new value set to a List<Node>
holding
the new nodes.public static final java.lang.String EDGES_PROPERTY
List<Edge>
holding the old
edges and its new value set to a List<Edge>
holding
the new edges.public Graph()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface org.eclipse.gef4.common.properties.IPropertyChangeNotifier
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.Object> getAttrs()
Graph
by reference.Graph
by reference.public java.util.List<Edge> getEdges()
public Node getNestingNode()
public java.util.List<Node> getNodes()
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 setNestingNode(Node nestingNode)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2014 itemis AG and others. All rights reserved.