edu.uci.ics.jung.graph.impl
Class AbstractElement
java.lang.Object
edu.uci.ics.jung.utils.UserDataDelegate
edu.uci.ics.jung.graph.impl.AbstractElement
- All Implemented Interfaces:
- Element, UserDataContainer, Cloneable
- Direct Known Subclasses:
- AbstractArchetypeEdge, AbstractArchetypeVertex
public abstract class AbstractElement
- extends UserDataDelegate
- implements Element, Cloneable
- Author:
- Joshua O'Madadhain
Field Summary |
protected int |
id
Used to define vertex equivalence. |
protected WeakReference |
m_Graph
The graph of which this vertex is an element. |
m_Graph
protected WeakReference m_Graph
- The graph of which this vertex is an element.
id
protected int id
- Used to define vertex equivalence.
AbstractElement
public AbstractElement()
getGraph
public ArchetypeGraph getGraph()
- Description copied from interface:
Element
- Returns a reference to the graph that contains this element.
If this element is not contained by any graph (is an "orphaned" element),
returns null.
- Specified by:
getGraph
in interface Element
- See Also:
Element.getGraph()
addGraph_internal
protected void addGraph_internal(AbstractArchetypeGraph g)
- Attaches this vertex to the specified graph
g
.
removeGraph_internal
protected void removeGraph_internal()
- Cleans up internal data structures after this
element is removed from a graph.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
- See Also:
Object.hashCode()
initialize
protected void initialize()
- Initializes all the data structures for this element.
(This is used on cloned elements, since
clone()
copies some information that should
not be in the new element.)