All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.NonLeaf

java.lang.Object
   |
   +----openjava.ptree.PtreeObject
           |
           +----openjava.ptree.NonLeaf

public class NonLeaf
extends PtreeObject
implements Ptree
The NonLeaf class presents for node of parse tree.

See Also:
Ptree, Leaf

Constructor Index

 o NonLeaf()
Allocates a new non-leaf(cons-cell), where the first element has null and the second element has null.

Method Index

 o elementAt(int)
Returns the specified element at the specified point of this nonleaf-node.
 o equals(Ptree)
Tests if this nonleaf-node's value equals to the specified ptree-node's.
 o getComment()
Obtains the comment of javadoc format which explains this declaration.
 o getContents()
Gets the contents of this nonleaf-node.
 o getLength()
getLength() returns the length of this nonleaf-node
 o makeCopy()
Makes a new copy of this nonleaf-node as a ptree-node.
 o makeRecursiveCopy()
Makes a new copy (another object) of this nonleaf-node recursively.
 o set(Ptree)
Makes this ptree a list presenting for [ p ]
 o set(Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 ]
 o set(Ptree, Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 p2 ]
 o set(Ptree, Ptree, Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 p2 p3 ]
 o set(Ptree, Ptree, Ptree, Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 ]
 o set(Ptree, Ptree, Ptree, Ptree, Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 ]
 o set(Ptree, Ptree, Ptree, Ptree, Ptree, Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 p6 ]
 o set(Ptree, Ptree, Ptree, Ptree, Ptree, Ptree, Ptree, Ptree)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 p6 p7 ]
 o set(Ptree[])
Makes this ptree a list presenting for [ p ]
 o setComment(Comment)
Sets the comment of javadoc format which explains this declaration.
 o setElementAt(Ptree, int)
Sets the specified element at the specified point of this nonleaf-node.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o NonLeaf
 public NonLeaf()
Allocates a new non-leaf(cons-cell), where the first element has null and the second element has null.

Methods

 o makeRecursiveCopy
 public Ptree makeRecursiveCopy()
Makes a new copy (another object) of this nonleaf-node recursively. The objects contained by this object will also be copied.

Returns:
the copy of this nonleaf-node as a ptree-node.
Overrides:
makeRecursiveCopy in class PtreeObject
 o makeCopy
 public Ptree makeCopy()
Makes a new copy of this nonleaf-node as a ptree-node. The objects contained by the new object are same as these contained by the original object.

Returns:
the copy of this nonleaf-node as a ptree-node.
Overrides:
makeCopy in class PtreeObject
 o equals
 public boolean equals(Ptree p)
Tests if this nonleaf-node's value equals to the specified ptree-node's.

Returns:
true if two values are same.
Overrides:
equals in class PtreeObject
 o set
 protected void set(Ptree ptrees[])
Makes this ptree a list presenting for [ p ]

Parameters:
p - list's element
 o set
 protected void set(Ptree p)
Makes this ptree a list presenting for [ p ]

Parameters:
p - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1)
Makes this ptree a list presenting for [ p0 p1 ]

Parameters:
p0 - list's element
p1 - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1,
                    Ptree p2)
Makes this ptree a list presenting for [ p0 p1 p2 ]

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1,
                    Ptree p2,
                    Ptree p3)
Makes this ptree a list presenting for [ p0 p1 p2 p3 ]

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
p3 - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1,
                    Ptree p2,
                    Ptree p3,
                    Ptree p4)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 ]

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
p3 - list's element
p4 - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1,
                    Ptree p2,
                    Ptree p3,
                    Ptree p4,
                    Ptree p5)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 ]

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
p3 - list's element
p4 - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1,
                    Ptree p2,
                    Ptree p3,
                    Ptree p4,
                    Ptree p5,
                    Ptree p6)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 p6 ]

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
p3 - list's element
p4 - list's element
p5 - list's element
p6 - list's element
 o set
 protected void set(Ptree p0,
                    Ptree p1,
                    Ptree p2,
                    Ptree p3,
                    Ptree p4,
                    Ptree p5,
                    Ptree p6,
                    Ptree p7)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 p6 p7 ]

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
p3 - list's element
p4 - list's element
p5 - list's element
p6 - list's element
p7 - list's element
 o writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

Overrides:
writeCode in class PtreeObject
 o elementAt
 protected Ptree elementAt(int i)
Returns the specified element at the specified point of this nonleaf-node.

Parameters:
i - index
Returns:
the ptree object at the specified point
 o setElementAt
 protected void setElementAt(Ptree p,
                             int i)
Sets the specified element at the specified point of this nonleaf-node.

Parameters:
p - ptree object to set
i - index
 o getContents
 protected Ptree[] getContents()
Gets the contents of this nonleaf-node.

Returns:
contents
 o getLength
 protected int getLength()
getLength() returns the length of this nonleaf-node

Returns:
the length of the list
 o setComment
 public void setComment(Comment comment)
Sets the comment of javadoc format which explains this declaration.

Parameters:
comment - the Comment object to set
 o getComment
 public Comment getComment()
Obtains the comment of javadoc format which explains this declaration.

Returns:
the string of the comment

All Packages  Class Hierarchy  This Package  Previous  Next  Index