KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > chaperon > process > extended > StackNodeList


1 /*
2  * Copyright (C) Chaperon. All rights reserved.
3  * -------------------------------------------------------------------------
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE file.
7  */

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 JavaDoc toString()
23   {
24     StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
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