|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectBasicGraphable
public abstract class BasicGraphable
Basic implementation of Graphable. This class serves as the root in the
hierarchy of basic graph components.
Components in the basic hierarchy implement the Serializable interface.
However serialization will fail if a Graphable object contains a reference
to a non serializable object.
modules/extension/graph (gt-graph.jar)
Constructor Summary | |
---|---|
BasicGraphable()
Constrcuts a new a graph component. |
Method Summary | |
---|---|
int |
getCount()
Returns the value of the counter for the component. |
int |
getID()
Returns an identifier for the component. |
Object |
getObject()
Returns the underlying object referenced by the graph component. |
boolean |
isVisited()
Determines if the component has been marked as visited. |
void |
setCount(int count)
Sets the value of the counter for the component. |
void |
setID(int id)
Sets the identifying integer for the component. |
void |
setObject(Object obj)
Sets the underlying object reference for the component. |
void |
setVisited(boolean visited)
Marks the component as being visited/unvisited. |
String |
toString()
Returns the id of the component as a string. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Graphable |
---|
getRelated |
Constructor Detail |
---|
public BasicGraphable()
Method Detail |
---|
public int getID()
Graphable
getID
in interface Graphable
Graphable.getID()
public void setID(int id)
Graphable
setID
in interface Graphable
id
- New identifying integer.Graphable.setID(int)
public Object getObject()
Graphable
getObject
in interface Graphable
Graphable.getObject()
public void setObject(Object obj)
Graphable
setObject
in interface Graphable
obj
- The entity being modelled by the graph component.Graphable.setObject(Object)
public boolean isVisited()
Graphable
isVisited
in interface Graphable
Graphable.isVisited()
public void setVisited(boolean visited)
Graphable
setVisited
in interface Graphable
visited
- True if visited(on), false if unvisited(off).Graphable.setVisited(boolean)
public int getCount()
Graphable
getCount
in interface Graphable
Graphable.getCount()
public void setCount(int count)
Graphable
setCount
in interface Graphable
count
- The new value of the counter for the component.Graphable.setCount(int)
public String toString()
toString
in class Object
Graphable.getID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |