All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ProgolInterface.Mode

java.lang.Object
   |
   +----ProgolInterface.Mode

public class Mode
extends Object
A class that represents a Progol mode declaration. The Class stores the mode type, predicate name and arity and a Vector of mode arguments, of type ModeArg.

See Also:
ModeArg

Constructor Index

 o Mode(Clause)
Constructs a Mode from a clause representation.
 o Mode(int, String, int)
Constructs a Mode of the specified mode type, predicate and arity.

Method Index

 o ArgumentAt(int)
 o arguments()
 o arity()
 o isHead()
 o listArgs(List)
Places a List representation of the arguments of the mode in the given java.awt.List.
 o modeType()
 o predicate()
 o predicateSymbol()
 o setArgumentAt(ModeArg, int)
Puts the specified ModeArg at the specified position.
 o toString()

Constructors

 o Mode
 public Mode(int mt,
             String pred,
             int arity)
Constructs a Mode of the specified mode type, predicate and arity. Since arguments are not specified, it fills them in with "+any"'s.

Parameters:
mt - The mode type.
pred - The predicate of the mode (without arity).
arity - The arity of the mode.
 o Mode
 public Mode(Clause cl)
Constructs a Mode from a clause representation.

Parameters:
clause - A Clause representation of the mode.

Methods

 o arity
 public final int arity()
Returns:
the arity of the mode.
 o predicateSymbol
 public final String predicateSymbol()
Returns:
the predicate symbol of the mode.
 o predicate
 public final String predicate()
Returns:
the predicate (without arity) of the mode.
 o modeType
 public final String modeType()
Returns:
the mode type of the mode.
 o isHead
 public final boolean isHead()
Returns:
true, if the mode is a head mode.
 o arguments
 public final Vector arguments()
Returns:
a Vector of the mode arguments.
 o setArgumentAt
 public final void setArgumentAt(ModeArg ma,
                                 int pos)
Puts the specified ModeArg at the specified position.

 o ArgumentAt
 public final ModeArg ArgumentAt(int pos)
Returns:
the ModeArg at the specified position.
 o listArgs
 public final void listArgs(List list)
Places a List representation of the arguments of the mode in the given java.awt.List.

 o toString
 public final String toString()
Returns:
a string representation of the Mode.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index