JavaDoc


ListElement

org.dbreplicator.graph
Class ListElement

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

public class ListElement
extends java.lang.Object

Instances of this class act as elements of a linked list. It is used for keeping Vertex-instances and Edge-instances in order.

  • The collision management strategy of the hash table,
  • the general vertex list of the graph,
  • and the edges of a single vertex
are all kept in a linked list of of ListElement instances.


Field Summary
 java.lang.Object hangingVertexOrEdge
          A link to the actual object represented by this "hanger" instance.
 ListElement next
           
 
Constructor Summary
ListElement()
          The null constructor gets called when we initialize the hash table.
ListElement(java.lang.Object objToHang)
          The list element is a general linked list element.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

next

public ListElement next

hangingVertexOrEdge

public java.lang.Object hangingVertexOrEdge
A link to the actual object represented by this "hanger" instance. Usually an instance of Vertex or Edge.

Constructor Detail

ListElement

public ListElement()
The null constructor gets called when we initialize the hash table. We attach null- containing-list elements to each hash index, for ease of coding. (If you want to understand why this is important, try to visualize the return value of the method findVertex without guarantee that each index in the hash table will have at least one ListElement...)


ListElement

public ListElement(java.lang.Object objToHang)
The list element is a general linked list element. It contains a link to the next element, and a hanger for the vertex or the edge that it represents.

Parameters:
objToHang - The object that we wish to "hang" in this list element, usually an instance of Vertex or Edge
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object



Powered by Drupal - Theme by Danger4k