JavaDoc


Vertex

org.dbreplicator.graph
Class Vertex

java.lang.Object
  extended by org.dbreplicator.graph.Vertex

public class Vertex
extends java.lang.Object

Instances of this class act as wrappers for the real vertex object, which can be for example Integer, or any object. Instances of this class always "hang" from a ListElement instance.


Field Summary
 ListElement firstEdge
          A link to the beginning of a linked list structure of the edges that leave this vertex.
 int graphMarker
          A Graph marker variable used for cycle detection, topological sorting and similar.
 java.lang.Object vertexObject
          A link to the actual abject, which can be any Object, which this vertex instance "wraps".
 
Constructor Summary
Vertex(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 ListElement 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 Object, which this vertex instance "wraps".


graphMarker

public int graphMarker
A Graph marker variable used for cycle detection, topological sorting and similar.

Constructor Detail

Vertex

public Vertex(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:
toString in class java.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.




Powered by Drupal - Theme by Danger4k