All Packages Class Hierarchy This Package Previous Next Index
Class aioli.vtp.LOperator
java.lang.Object
|
+----aioli.vtp.LOperator
- public class LOperator
- extends Object
- implements Operator
A class that implements a list arity operator,
- See Also:
- Operator
-
LOperator(String, Formalism, Phylum, Arity)
- The list arity operator constructor.
-
arity()
-
Gives the arity of the operator.
-
atomic()
-
Checks if the operator is atomic.
-
belongs(Phylum)
-
Checks if an operator belongs to a given phylum.
-
formalism()
-
Returns the formalism of the operator.
-
genDTD(PrintWriter)
-
-
genJava(PrintWriter, String)
-
Generates some Java code that correspond to the definition
of the operator.
-
getCode()
-
Gives the code of the operator.
-
name()
-
Gives the name of the operator.
-
phylum(int)
-
Returns the phylum of a given son.
-
setCode(int)
-
Sets the code of the operator.
-
toString()
- Returns the Metal definition of the operator.
-
tree()
-
Returns a dummy tree with this operator as head operator.
LOperator
public LOperator(String n,
Formalism f,
Phylum ph,
Arity a)
- The list arity operator constructor.
- Parameters:
- n - The name of the operator.
- f - is the formalism where it has to be added.
- ph - The phylum the sons of the operator belong to.
- a - The arity of the operator.
- See Also:
- Formalism, Phylum, Arity
getCode
public int getCode()
- Gives the code of the operator.
- Returns:
- An int that represents the code of the operator.
setCode
public void setCode(int a)
- Sets the code of the operator.
- Parameters:
- a - Code of the operator.
arity
public Arity arity()
- Gives the arity of the operator.
- Returns:
- The arity of the operator.
name
public String name()
- Gives the name of the operator.
- Returns:
- The String representing the name of the operator.
atomic
public boolean atomic()
- Checks if the operator is atomic.
- Returns:
- Always false it's a list arity operator.
belongs
public boolean belongs(Phylum ph)
- Checks if an operator belongs to a given phylum.
param ph A phylum.
- Returns:
- true if the operator belongs to the phylum ph false otherwise.
formalism
public Formalism formalism()
- Returns the formalism of the operator.
- Returns:
- A formalism.
phylum
public Phylum phylum(int n)
- Returns the phylum of a given son.
- Parameters:
- n - Denotes the son.
- Returns:
- A phylum or null.
tree
public Tree tree()
- Returns a dummy tree with this operator as head operator.
- Returns:
- A tree.
toString
public String toString()
- Returns the Metal definition of the operator.
- Overrides:
- toString in class Object
genJava
public void genJava(PrintWriter ps,
String str)
- Generates some Java code that correspond to the definition
of the operator.
- Parameters:
- ps - The output Writer.
- str - The formalism name.
genDTD
public void genDTD(PrintWriter ps)
All Packages Class Hierarchy This Package Previous Next Index