Package org.graffiti.graph
Class AbstractGraphElement
java.lang.Object
org.graffiti.attributes.AbstractAttributable
org.graffiti.graph.AbstractGraphElement
- All Implemented Interfaces:
Comparable<GraphElement>,Attributable,GraphElement
- Direct Known Subclasses:
AbstractEdge,AbstractNode
public abstract class AbstractGraphElement extends AbstractAttributable implements GraphElement
GraphElements are Attributables which know the graph they belong to. This
class provides the functionality for accessing the graph.
- See Also:
AbstractNode,AbstractEdge,Node,Edge
-
Constructor Summary
Constructors Constructor Description AbstractGraphElement()Constructs a newAbstrctGraphElement.AbstractGraphElement(CollectionAttribute coll)Constructs a newAbstrctGraphElement.AbstractGraphElement(Graph graph)Constructs a newAbstrctGraphElement.AbstractGraphElement(Graph graph, CollectionAttribute coll)Constructs a newAbstrctGraphElement. -
Method Summary
Modifier and Type Method Description intcompareTo(AbstractGraphElement o)GraphgetGraph()Returns the Graph theAbstractGraphElementbelongs to.longgetID()ListenerManagergetListenerManager()Returns the ListenerManager of theGraphElement.intgetViewID()voidsetID(long id)voidsetViewID(int viewID)Methods inherited from class org.graffiti.attributes.AbstractAttributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graffiti.attributes.Attributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setStringMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
AbstractGraphElement
public AbstractGraphElement()Constructs a newAbstrctGraphElement. -
AbstractGraphElement
Constructs a newAbstrctGraphElement.- Parameters:
coll- theCollectionAttributeof the newAbstractGraphElementinstance.
-
AbstractGraphElement
Constructs a newAbstrctGraphElement. Sets the graph of the currentAbstrctGraphElement.- Parameters:
graph- the graph theAbstrctGraphElementbelongs to.coll- theCollectionAttributeof the newAbstractGraphElementinstance.
-
AbstractGraphElement
Constructs a newAbstrctGraphElement. Sets the graph of the currentAbstrctGraphElement.- Parameters:
graph- the graph theAbstrctGraphElementbelongs to.
-
-
Method Details
-
getGraph
Returns the Graph theAbstractGraphElementbelongs to.- Specified by:
getGraphin interfaceGraphElement- Returns:
- the Graph the GraphElement belongs to.
-
getListenerManager
Returns the ListenerManager of theGraphElement.- Specified by:
getListenerManagerin interfaceAttributable- Returns:
- the ListenerManager of the
GraphElement.
-
setViewID
public void setViewID(int viewID)- Specified by:
setViewIDin interfaceGraphElement
-
getViewID
public int getViewID()- Specified by:
getViewIDin interfaceGraphElement
-
compareTo
-
getID
public long getID()- Specified by:
getIDin interfaceGraphElement
-
setID
public void setID(long id)- Specified by:
setIDin interfaceGraphElement
-