All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.List

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

public abstract class List
extends PtreeObject
implements Ptree
The List class presents for the list of parse trees.


Variable Index

 o ptreelist
The ptreelist the list of parse-tree nodes

Constructor Index

 o List()
Allocates this List
 o List(Ptree)
Allocates this List
 o List(String)
Allocates this List
 o List(String, Ptree)
Allocates this List
 o List(String, Ptree, Ptree)
Allocates this List with the specified ptree elements.
 o List(String, Ptree, Ptree, Ptree)
Allocates this List with the specified ptree elements.
 o List(String, Ptree, Ptree, Ptree, Ptree)
Allocates this List with the specified ptree elements.

Method Index

 o contains(Ptree)
Tests if any element in this list equal to the specified string.
 o contains(String)
Tests if any element in this list equal to the specified string.
 o equals(Ptree)
Tests if this list-node's value equals to the specified ptree-node's.
 o getLength()
Returns the length of this list.
 o isEmpty()
Tests if this list is empty.
 o makeCopy()
Makes a new copy (another object) of this list-node.
 o makeRecursiveCopy()
Makes a new copy (another object) of this list-node.
 o removeAllElements()
Removes an element at the specified point from this list
 o removeElementAt(int)
Removes an element at the specified point from this list
 o removeLastElement()
Removes the last element from this list This equals to obj.removeElemntAt( obj.getLength() )
 o set(UtilityList)
 o size()
 o writeCode()
Writes the code this parse-tree presents for.

Variables

 o ptreelist
 protected UtilityList ptreelist
The ptreelist the list of parse-tree nodes

Constructors

 o List
 protected List()
Allocates this List

Parameters:
p0 - list's element
 o List
 protected List(Ptree p)
Allocates this List

Parameters:
p0 - list's element
 o List
 protected List(String delimiter)
Allocates this List

 o List
 protected List(String delimiter,
                Ptree p)
Allocates this List

Parameters:
p0 - list's element
 o List
 protected List(String delimiter,
                Ptree p0,
                Ptree p1)
Allocates this List with the specified ptree elements.

Parameters:
p0 - list's element
p1 - list's element
 o List
 protected List(String delimiter,
                Ptree p0,
                Ptree p1,
                Ptree p2)
Allocates this List with the specified ptree elements.

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
 o List
 protected List(String delimiter,
                Ptree p0,
                Ptree p1,
                Ptree p2,
                Ptree p3)
Allocates this List with the specified ptree elements.

Parameters:
p0 - list's element
p1 - list's element
p2 - list's element
p3 - list's element

Methods

 o set
 protected void set(UtilityList lst)
 o getLength
 public int getLength()
Returns the length of this list.

Returns:
the length of this list
 o isEmpty
 public boolean isEmpty()
Tests if this list is empty.

Returns:
true if this list is empty
 o removeElementAt
 public void removeElementAt(int n)
Removes an element at the specified point from this list

Parameters:
n - where to remove element.
 o removeLastElement
 public void removeLastElement()
Removes the last element from this list This equals to obj.removeElemntAt( obj.getLength() )

Parameters:
n - where to remove element.
 o size
 public int size()
 o removeAllElements
 public void removeAllElements()
Removes an element at the specified point from this list

Parameters:
n - where to remove element.
 o equals
 public boolean equals(Ptree p)
Tests if this list-node's value equals to the specified ptree-node's.

Returns:
true if two values are same.
Overrides:
equals in class PtreeObject
 o makeRecursiveCopy
 public Ptree makeRecursiveCopy()
Makes a new copy (another object) of this list-node. 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 (another object) of this list-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 writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

Overrides:
writeCode in class PtreeObject
 o contains
 public boolean contains(String str)
Tests if any element in this list equal to the specified string. No NonLeaf object will not matched with any strings.

Parameters:
str - the string to compare.
Returns:
true if one or more elements who represent the specified string is find in this list.
See Also:
equals
 o contains
 public boolean contains(Ptree q)
Tests if any element in this list equal to the specified string. No NonLeaf object will not matched with any strings.

Parameters:
str - the string to compare.
Returns:
true if one or more elements who represent the specified string is find in this list.
See Also:
equals

All Packages  Class Hierarchy  This Package  Previous  Next  Index