com.mhhe.clrs2e
Class DisjointSetLinkedList.DisjointSet

java.lang.Object
  |
  +--com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet
Enclosing class:
DisjointSetLinkedList

private static class DisjointSetLinkedList.DisjointSet
extends java.lang.Object

Private inner class for each disjoint set.


Field Summary
 DisjointSetLinkedList.Node head
          The head of the list.
 int size
          How many elements are in this set.
 DisjointSetLinkedList.Node tail
          The tail of the list.
 
Constructor Summary
DisjointSetLinkedList.DisjointSet(DisjointSetLinkedList.Node x)
          Makes a singleton set with a given node.
 
Method Summary
 java.lang.String toString()
          Returns the String representation of this set, with each element appearing on a separate line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

head

public DisjointSetLinkedList.Node head
The head of the list.


tail

public DisjointSetLinkedList.Node tail
The tail of the list.


size

public int size
How many elements are in this set.

Constructor Detail

DisjointSetLinkedList.DisjointSet

public DisjointSetLinkedList.DisjointSet(DisjointSetLinkedList.Node x)
Makes a singleton set with a given node.

Parameters:
x - The node in this singleton set.
Method Detail

toString

public java.lang.String toString()
Returns the String representation of this set, with each element appearing on a separate line.

Overrides:
toString in class java.lang.Object