All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.vtp.TreeMatchResults

java.lang.Object
   |
   +----aioli.vtp.TreeMatchResults

public class TreeMatchResults
extends Object
implements MatchResults, Cloneable
A Class for pattern matching results. Stores the metavariable values and the path to the matched extract positions.


Method Index

 o add(IPath)
Sets the value of a new extract position.
 o add(Metavariable, int)
Sets the value of the metavariable.
 o add(Metavariable, String)
Sets the value of the metavariable.
 o add(Metavariable, Tree)
Sets the value of the metavariable.
 o clone()
Returns a copy of that object.
 o elements()
 o get(int)
Returns the move to reach the extractNumberth extract position.
 o get(String)
Returns the tree value that the metavariable meta has matched.
 o getRootPatt()
Returns the root pattern of the pattern matching process.
 o getRootTree()
Returns the root tree of the pattern matching process.
 o getValue(String)
Returns the value that the metavariable meta has matched.
 o isPresent(String)
Returns true if meta is already in the results, false otherwise.
 o remove(Metavariable)
Removes the metavariable of the results.
 o set(int, IPath)
Sets the value of a preexistent extract position.
 o setRootPatt(Tree)
Sets the root pattern of the pattern matching process.
 o setRootTree(Tree)
Sets the root tree of the pattern matching process.
 o toString()
Returns a String reprsenting the object.

Methods

 o elements
 public Enumeration elements()
 o setRootTree
 public void setRootTree(Tree tree)
Sets the root tree of the pattern matching process.

Parameters:
tree - The root tree.
 o getRootTree
 public Tree getRootTree()
Returns the root tree of the pattern matching process.

 o setRootPatt
 public void setRootPatt(Tree tree)
Sets the root pattern of the pattern matching process.

Parameters:
tree - The root pattern.
 o getRootPatt
 public Tree getRootPatt()
Returns the root pattern of the pattern matching process.

 o clone
 public Object clone()
Returns a copy of that object.

Overrides:
clone in class Object
 o isPresent
 public boolean isPresent(String meta)
Returns true if meta is already in the results, false otherwise.

 o get
 public Tree get(String meta)
Returns the tree value that the metavariable meta has matched.

Parameters:
meta - The name of the metavariable.
Returns:
A tree or null.
 o getValue
 public Object getValue(String meta)
Returns the value that the metavariable meta has matched.

Parameters:
meta - The name of the metavariable.
Returns:
An object or null.
 o get
 public IPath get(int extractNumber)
Returns the move to reach the extractNumberth extract position.

Parameters:
extractNumber - The number of the extract pattern (they are numbered in a preorder traversal).
Returns:
A move or null, if this extract position doesn't exist.
 o add
 public Tree add(Metavariable meta,
                 Tree tree)
Sets the value of the metavariable. Adds the metavariable if it is not present. Checks if the class is anonym, then returns the value Checks if the value is compatible with the old value when present.

Parameters:
meta - The metavariable.
tree - The tree value.
Returns:
tree or null if the metavariable can't take that value.
 o add
 public boolean add(Metavariable meta,
                    int i)
Sets the value of the metavariable. Adds the metavariable if it is not present. Checks if the value is compatible with the old value when present.

Parameters:
meta - The metavariable.
i - The integer value.
Returns:
true or false if the metavariable can't take that value.
 o add
 public String add(Metavariable meta,
                   String str)
Sets the value of the metavariable. Adds the metavariable if it is not present. Checks if the value is compatible with the old value when present.

Parameters:
meta - The metavariable.
str - The String value.
Returns:
Str or null if the metavariable can't take that value.
 o remove
 public Metavariable remove(Metavariable meta)
Removes the metavariable of the results.

Returns:
The old value or null if the metavariable is not present.
 o add
 public int add(IPath move)
Sets the value of a new extract position.

Parameters:
move - The move to the extract position.
Returns:
the number of the extract positon.
 o set
 public int set(int n,
                IPath move)
Sets the value of a preexistent extract position.

Parameters:
move - The move to the extract position.
Returns:
the number of the extract positon.
 o toString
 public String toString()
Returns a String reprsenting the object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index