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.
-
add(IPath)
- Sets the value of a new extract position.
-
add(Metavariable, int)
- Sets the value of the metavariable.
-
add(Metavariable, String)
- Sets the value of the metavariable.
-
add(Metavariable, Tree)
- Sets the value of the metavariable.
-
clone()
- Returns a copy of that object.
-
elements()
-
-
get(int)
- Returns the move to reach the extractNumberth extract
position.
-
get(String)
- Returns the tree value that the metavariable meta has matched.
-
getRootPatt()
- Returns the root pattern of the pattern matching process.
-
getRootTree()
- Returns the root tree of the pattern matching process.
-
getValue(String)
- Returns the value that the metavariable meta has matched.
-
isPresent(String)
- Returns true if meta is already in the results, false otherwise.
-
remove(Metavariable)
- Removes the metavariable of the results.
-
set(int, IPath)
- Sets the value of a preexistent extract position.
-
setRootPatt(Tree)
- Sets the root pattern of the pattern matching process.
-
setRootTree(Tree)
- Sets the root tree of the pattern matching process.
-
toString()
- Returns a String reprsenting the object.
elements
public Enumeration elements()
setRootTree
public void setRootTree(Tree tree)
- Sets the root tree of the pattern matching process.
- Parameters:
- tree - The root tree.
getRootTree
public Tree getRootTree()
- Returns the root tree of the pattern matching process.
setRootPatt
public void setRootPatt(Tree tree)
- Sets the root pattern of the pattern matching process.
- Parameters:
- tree - The root pattern.
getRootPatt
public Tree getRootPatt()
- Returns the root pattern of the pattern matching process.
clone
public Object clone()
- Returns a copy of that object.
- Overrides:
- clone in class Object
isPresent
public boolean isPresent(String meta)
- Returns true if meta is already in the results, false otherwise.
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.
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.
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.
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.
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.
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.
remove
public Metavariable remove(Metavariable meta)
- Removes the metavariable of the results.
- Returns:
- The old value or null if the metavariable is not present.
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.
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.
toString
public String toString()
- Returns a String reprsenting the object.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index