|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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.
Fields inherited from class openjava.ptree.ParseTreeObject |
debugFlag,
debugLevel,
LN,
out,
writerStack |
Constructor Summary | |
protected |
List()
Allocates this List |
protected |
List(java.lang.Object p)
Allocates this List |
protected |
List(java.lang.String delimiter)
Allocates this List |
protected |
List(java.lang.String delimiter,
java.lang.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(java.lang.String str)
Tests if any element representing the specified string is exist or not. |
protected void |
contents_addElement(java.lang.Object obj)
|
protected java.lang.Object |
contents_elementAt(int index)
|
protected void |
contents_insertElementAt(java.lang.Object obj,
int index)
|
protected void |
contents_removeElementAt(int index)
|
protected void |
contents_setElementAt(java.lang.Object obj,
int index)
|
protected int |
contents_size()
|
java.util.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 |
Constructor Detail |
protected List()
protected List(java.lang.Object p)
p0
- list's elementprotected List(java.lang.String delimiter)
protected List(java.lang.String delimiter, java.lang.Object p)
p0
- list's elementMethod Detail |
protected final void replaceChildWith(ParseTree dist, ParseTree replacement) throws ParseTreeException
protected void contents_addElement(java.lang.Object obj)
protected void contents_insertElementAt(java.lang.Object obj, int index)
protected void contents_setElementAt(java.lang.Object obj, int index)
protected java.lang.Object contents_elementAt(int index)
protected void contents_removeElementAt(int index)
protected int contents_size()
public java.util.Enumeration elements()
public int size()
public boolean isEmpty()
public void removeAll()
n
- where to remove element.public boolean contains(java.lang.String str)
str
- a string to test.public boolean equals(ParseTree p)
public ParseTree makeRecursiveCopy()
public void writeCode()
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.
visitor
- a visitor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |