1 8 9 package net.sourceforge.chaperon.process.extended; 10 11 public class StackNodeList 12 { 13 StackNode node; 14 StackNodeList next; 15 16 public StackNodeList(StackNode node, StackNodeList next) 17 { 18 this.node = node; 19 this.next = next; 20 } 21 22 public String toString() 23 { 24 StringBuffer buffer = new StringBuffer (); 25 buffer.append("{"); 26 for (StackNodeList list = this; list!=null; list = list.next) 27 { 28 buffer.append(list.node.toString()); 29 if (list.next!=null) 30 buffer.append(","); 31 } 32 33 buffer.append("}"); 34 return buffer.toString(); 35 } 36 } 37 | Popular Tags |