|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dbreplicator.graph
Class JbVertex
java.lang.Objectorg.dbreplicator.graph.JbVertex
public class JbVertex
- extends java.lang.Object
Instances of this class act as wrappers for the real vertex object, which
can be for example java.lang.Integer, or any object. Instances of this
class always "hang" from a JbListElement instance.
| Field Summary | |
|---|---|
JbListElement |
firstEdge
A link to the beginning of a linked list structure of the edges that leave this vertex. |
int |
marker
A marker variable used for cycle detection, topological sorting and similar. |
java.lang.Object |
vertexObject
A link to the actual abject, which can be any java.lang.Object, which this vertex instance "wraps". |
| Constructor Summary | |
|---|---|
JbVertex(java.lang.Object objToEmbed)
A wrapper class for the actual java.lang.Object to be situated in the graph. |
|
| Method Summary | |
|---|---|
void |
addInDegree()
Accessor method to increment in-degree by one. |
void |
addOutDegree()
Accessor method to increment out-degree by one. |
java.lang.String |
toString()
|
int |
whatIsInDegree()
Returns the number of edges coming into this vertex. |
int |
whatIsOutDegree()
Returns the number of edges leaving this vertex. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
firstEdge
public JbListElement firstEdge
- A link to the beginning of a linked list structure of
the edges that leave this vertex.
vertexObject
public java.lang.Object vertexObject
- A link to the actual abject, which can be any java.lang.Object,
which this vertex instance "wraps".
marker
public int marker
- A marker variable used for cycle detection, topological sorting
and similar.
| Constructor Detail |
|---|
JbVertex
public JbVertex(java.lang.Object objToEmbed)
- A wrapper class for the actual java.lang.Object to be
situated in the graph.
- Parameters:
objToEmbed- The java.lang.Object that we wish to have wrapped.
| Method Detail |
|---|
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
whatIsInDegree
public int whatIsInDegree()
- Returns the number of edges coming into this vertex.
- Returns:
- The in-degree of this vertex.
whatIsOutDegree
public int whatIsOutDegree()
- Returns the number of edges leaving this vertex.
- Returns:
- The out-degree of this vertex.
addInDegree
public void addInDegree()
- Accessor method to increment in-degree by one.
addOutDegree
public void addOutDegree()
- Accessor method to increment out-degree by one.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dbreplicator.graph.JbVertex

