KickJava   Java API By Example, From Geeks To Geeks.

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


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 import net.sourceforge.chaperon.model.extended.Pattern;
12
13 public class TerminalStackNode extends StackNode
14 {
15   public char[] text = null;
16   public int position = 0;
17
18   public TerminalStackNode(char[] text, int position, Pattern pattern, StackNode ancestor)
19   {
20     this.text = text;
21     this.position = position;
22     this.pattern = pattern;
23     this.ancestor = ancestor;
24     this.last = this;
25   }
26
27   public String JavaDoc getText()
28   {
29     if (text!=null)
30       return String.valueOf(text[position]);
31
32     return "";
33   }
34 }
35
Popular Tags