|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--openjava.ptree.ParseTreeObject | +--openjava.ptree.List
The List class presents for the list of parse trees.
Field Summary | |
private Vector |
contents
The ptreelist the list of parse-tree nodes |
private String |
delimiter
|
Fields inherited from class openjava.ptree.ParseTreeObject |
debugFlag, debugLevel, LN, out, writerStack |
Constructor Summary | |
protected |
List()
Allocates this List |
protected |
List(Object p)
Allocates this List |
protected |
List(String delimiter)
Allocates this List |
protected |
List(String delimiter,
Object p)
Allocates this List |
Method Summary | |
void |
childrenAccept(ParseTreeVisitor visitor)
Accepts a ParseTreeVisitor object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern. |
boolean |
contains(String str)
Tests if any element representing the specified string is exist or not. |
protected void |
contents_addElement(Object obj)
|
protected Object |
contents_elementAt(int index)
|
protected void |
contents_insertElementAt(Object obj,
int index)
|
protected void |
contents_removeElementAt(int index)
|
protected void |
contents_setElementAt(Object obj,
int index)
|
protected int |
contents_size()
|
Enumeration |
elements()
Get contents |
boolean |
equals(ParseTree p)
Tests if this list-node's value equals to the specified ptree-node's. |
boolean |
isEmpty()
Tests if this list is empty. |
ParseTree |
makeRecursiveCopy()
Makes a new copy (another object) of this list-node. |
void |
removeAll()
Removes an element at the specified point from this list |
protected void |
replaceChildWith(ParseTree dist,
ParseTree replacement)
|
int |
size()
Returns the length of this list. |
void |
writeCode()
Writes the code this parse-tree presents for. |
Methods inherited from class openjava.ptree.ParseTreeObject |
accept, clone, eq, eq, equal, flushPrintWriter, getDebugFlag, getNest, getObjectID, getParent, getPrintWriter, getTab, hashCode, lastObjectID, makeCopy, popNest, popPrintWriter, pushNest, pushPrintWriter, replace, setDebugFlag, setDebugLevel, setNest, setParent, setPrintStream, setTab, toFlattenString, toString, writeDebug, writeDebugL, writeDebugLln, writeDebugln, writeDebugLR, writeDebugR, writeDebugRln, writeTab |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface openjava.ptree.ParseTree |
accept, eq, getObjectID, makeCopy, replace, toFlattenString, toString |
Field Detail |
private Vector contents
private String delimiter
Constructor Detail |
protected List()
protected List(Object p)
protected List(String delimiter)
protected List(String delimiter, Object p)
Method Detail |
protected final void replaceChildWith(ParseTree dist, ParseTree replacement) throws ParseTreeException
replaceChildWith
in class ParseTreeObject
ParseTreeException
protected void contents_addElement(Object obj)
protected void contents_insertElementAt(Object obj, int index)
protected void contents_setElementAt(Object obj, int index)
protected Object contents_elementAt(int index)
protected void contents_removeElementAt(int index)
protected int contents_size()
public Enumeration elements()
public int size()
public boolean isEmpty()
public void removeAll()
public boolean contains(String str)
str
- a string to test.
public boolean equals(ParseTree p)
equals
in interface ParseTree
equals
in class ParseTreeObject
public ParseTree makeRecursiveCopy()
makeRecursiveCopy
in interface ParseTree
makeRecursiveCopy
in class ParseTreeObject
public void writeCode()
writeCode
in interface ParseTree
writeCode
in class ParseTreeObject
public void childrenAccept(ParseTreeVisitor visitor) throws ParseTreeException
ParseTreeVisitor
object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern.
This invoke an appropriate visit()
method on each
child ParseTree
object with this visitor.
childrenAccept
in interface ParseTree
childrenAccept
in class ParseTreeObject
visitor
- a visitor
ParseTreeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |