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.
-
ptreelist
- The ptreelist the list of parse-tree nodes
-
List()
- Allocates this List
-
List(Ptree)
- Allocates this List
-
List(String)
- Allocates this List
-
List(String, Ptree)
- Allocates this List
-
List(String, Ptree, Ptree)
- Allocates this List with the specified ptree elements.
-
List(String, Ptree, Ptree, Ptree)
- Allocates this List with the specified ptree elements.
-
List(String, Ptree, Ptree, Ptree, Ptree)
- Allocates this List with the specified ptree elements.
-
contains(Ptree)
- Tests if any element in this list equal to the specified string.
-
contains(String)
- Tests if any element in this list equal to the specified string.
-
equals(Ptree)
- Tests if this list-node's value equals to the specified
ptree-node's.
-
getLength()
- Returns the length of this list.
-
isEmpty()
- Tests if this list is empty.
-
makeCopy()
- Makes a new copy (another object) of this list-node.
-
makeRecursiveCopy()
- Makes a new copy (another object) of this list-node.
-
removeAllElements()
- Removes an element at the specified point from this list
-
removeElementAt(int)
- Removes an element at the specified point from this list
-
removeLastElement()
- Removes the last element from this list
This equals to obj.removeElemntAt( obj.getLength() )
-
set(UtilityList)
-
-
size()
-
-
writeCode()
- Writes the code this parse-tree presents for.
ptreelist
protected UtilityList ptreelist
- The ptreelist the list of parse-tree nodes
List
protected List()
- Allocates this List
- Parameters:
- p0 - list's element
List
protected List(Ptree p)
- Allocates this List
- Parameters:
- p0 - list's element
List
protected List(String delimiter)
- Allocates this List
List
protected List(String delimiter,
Ptree p)
- Allocates this List
- Parameters:
- p0 - list's element
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
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
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
set
protected void set(UtilityList lst)
getLength
public int getLength()
- Returns the length of this list.
- Returns:
- the length of this list
isEmpty
public boolean isEmpty()
- Tests if this list is empty.
- Returns:
- true if this list is empty
removeElementAt
public void removeElementAt(int n)
- Removes an element at the specified point from this list
- Parameters:
- n - where to remove element.
removeLastElement
public void removeLastElement()
- Removes the last element from this list
This equals to obj.removeElemntAt( obj.getLength() )
- Parameters:
- n - where to remove element.
size
public int size()
removeAllElements
public void removeAllElements()
- Removes an element at the specified point from this list
- Parameters:
- n - where to remove element.
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
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
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
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class PtreeObject
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
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