// Source code example for "A Practical Introduction // to Data Structures and Algorithm Analysis" // by Clifford A. Shaffer, Prentice Hall, 1998. // Copyright 1998 by Clifford A. Shaffer // Edge class for Adjacency List graph representation class Edgel implements Edge { private int vert1, vert2; // Indices of v1, v2 private Link itself; // Pointer to node in the adjacency list public Edgel(int vt1, int vt2, Link it) // Constructor { vert1 = vt1; vert2 = vt2; itself = it; } public int v1() { return vert1; } public int v2() { return vert2; } Link theLink() { return itself; } // Access into adjacency list } // class Edgel