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 int
compareTo(AbstractGraphElement o)
Graph
getGraph()
Returns the Graph theAbstractGraphElement
belongs to.long
getID()
ListenerManager
getListenerManager()
Returns the ListenerManager of theGraphElement
.int
getViewID()
void
setID(long id)
void
setViewID(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, setString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, setString
Methods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
AbstractGraphElement
public AbstractGraphElement()Constructs a newAbstrctGraphElement
. -
AbstractGraphElement
Constructs a newAbstrctGraphElement
.- Parameters:
coll
- theCollectionAttribute
of the newAbstractGraphElement
instance.
-
AbstractGraphElement
Constructs a newAbstrctGraphElement
. Sets the graph of the currentAbstrctGraphElement
.- Parameters:
graph
- the graph theAbstrctGraphElement
belongs to.coll
- theCollectionAttribute
of the newAbstractGraphElement
instance.
-
AbstractGraphElement
Constructs a newAbstrctGraphElement
. Sets the graph of the currentAbstrctGraphElement
.- Parameters:
graph
- the graph theAbstrctGraphElement
belongs to.
-
-
Method Details
-
getGraph
Returns the Graph theAbstractGraphElement
belongs to.- Specified by:
getGraph
in interfaceGraphElement
- Returns:
- the Graph the GraphElement belongs to.
-
getListenerManager
Returns the ListenerManager of theGraphElement
.- Specified by:
getListenerManager
in interfaceAttributable
- Returns:
- the ListenerManager of the
GraphElement
.
-
setViewID
public void setViewID(int viewID)- Specified by:
setViewID
in interfaceGraphElement
-
getViewID
public int getViewID()- Specified by:
getViewID
in interfaceGraphElement
-
compareTo
-
getID
public long getID()- Specified by:
getID
in interfaceGraphElement
-
setID
public void setID(long id)- Specified by:
setID
in interfaceGraphElement
-