All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.vtp.FOperator

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

public class FOperator
extends Object
implements Operator
Implements a fixed arity operator


Constructor Index

 o FOperator(String, Formalism, Phylum[], int)
Creates a fixed arity operator.

Method Index

 o arity()
Gives the arity of the operator.
 o atomic()
Checks if the operator is atomic.
 o belongs(Phylum)
Checks if an operator belongs to a given phylum.
 o formalism()
Returns the formalism of the operator.
 o genDTD(PrintWriter)
 o genJava(PrintWriter, String)
Generates some Java code that corresponds to the definition of the operator.
 o getCode()
Gives the code of the operator.
 o name()
Gives the name of the operator.
 o phylum(int)
Returns the phylum of a given son.
 o setCode(int)
Sets the code of the operator.
 o toString()
Returns the Metal definition of the operator.
 o tree()
Returns a dummy tree with this operator as head operator.

Constructors

 o FOperator
 public FOperator(String n,
                  Formalism f,
                  Phylum ph[],
                  int a)
Creates a fixed arity operator.

Parameters:
n - is the name of the operator.
f - is the formalism where it has to be added.
ph - is the list of the phyla of the sons.
a - The arity of the operator.
See Also:
Formalism, Phylum

Methods

 o getCode
 public int getCode()
Gives the code of the operator.

Returns:
An int that represents the code of the operator.
 o setCode
 public void setCode(int a)
Sets the code of the operator.

Parameters:
a - Code of the operator.
 o arity
 public Arity arity()
Gives the arity of the operator.

Returns:
The arity of the operator.
See Also:
Arity
 o name
 public String name()
Gives the name of the operator.

Returns:
The String representing the name of the operator.
 o atomic
 public boolean atomic()
Checks if the operator is atomic.

Returns:
Always false it's a fixed operator.
 o 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.
 o formalism
 public Formalism formalism()
Returns the formalism of the operator.

Returns:
A formalism.
 o phylum
 public Phylum phylum(int n)
Returns the phylum of a given son.

Parameters:
n - Denotes the son.
Returns:
A phylum or null.
 o tree
 public Tree tree()
Returns a dummy tree with this operator as head operator.

Returns:
A tree.
See Also:
tree
 o toString
 public String toString()
Returns the Metal definition of the operator.

Overrides:
toString in class Object
 o genJava
 public void genJava(PrintWriter ps,
                     String str)
Generates some Java code that corresponds to the definition of the operator.

Parameters:
ps - The output Writer.
str - The formalism name.
 o genDTD
 public void genDTD(PrintWriter ps)

All Packages  Class Hierarchy  This Package  Previous  Next  Index