edu.uci.ics.jung.graph.impl
Class AbstractElement

java.lang.Object
  extended by edu.uci.ics.jung.utils.UserDataDelegate
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.uci.ics.jung.utils.UserDataContainer
UserDataContainer.CopyAction
 
Field Summary
protected  int id
          Used to define vertex equivalence.
protected  WeakReference m_Graph
          The graph of which this vertex is an element.
 
Fields inherited from class edu.uci.ics.jung.utils.UserDataDelegate
factory, udc_delegate
 
Constructor Summary
AbstractElement()
           
 
Method Summary
protected  void addGraph_internal(AbstractArchetypeGraph g)
          Attaches this vertex to the specified graph g.
 ArchetypeGraph getGraph()
          Returns a reference to the graph that contains this element.
 int hashCode()
           
protected  void initialize()
          Initializes all the data structures for this element.
protected  void removeGraph_internal()
          Cleans up internal data structures after this element is removed from a graph.
 
Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.uci.ics.jung.graph.Element
getIncidentElements
 
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
 

Field Detail

m_Graph

protected WeakReference m_Graph
The graph of which this vertex is an element.


id

protected int id
Used to define vertex equivalence.

Constructor Detail

AbstractElement

public AbstractElement()
Method Detail

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.)