1 package com.pow2.structures.tree;
2
3
4 import com.pow2.resources.PropertyContainerImpl;
5
6
7 /***
8 * StringBufferNodeVisitor class.
9 * <br>
10 * A NodeVisitor class with a StringBuffer.
11 *
12 * @author Luca Fossato
13 * @created 06 July 2002
14 */
15 public abstract class StringBufferNodeVisitor
16 extends PropertyContainerImpl
17 implements NodeVisitorInterface
18 {
19 /***
20 * the StringBuffer object where to store the node data
21 * collected by <code>visit</code> method.
22 */
23 protected StringBuffer buffer;
24
25 /*** traverse counter */
26 protected long counter = 0;
27
28
29 /***
30 * Gets the buffer attribute of the StringBufferNodeVisitor object
31 *
32 * @return The buffer value
33 */
34 public StringBuffer getBuffer()
35 {
36 return buffer;
37 }
38
39
40 /***
41 * Sets the buffer attribute of the StringBufferNodeVisitor object
42 *
43 * @param buffer The new buffer value
44 */
45 public void setBuffer(StringBuffer buffer)
46 {
47 this.buffer = buffer;
48 }
49
50
51 /***
52 * Sets the counter attribute of the MenuNodeVisitor object
53 *
54 * @param counter The new counter value
55 */
56 public void setCounter(long counter)
57 {
58 this.counter = counter;
59 }
60
61
62 /***
63 * Gets the counter attribute of the MenuNodeVisitor object
64 *
65 * @return The counter value
66 */
67 public long getCounter()
68 {
69 return counter;
70 }
71 }