|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--alice.logictuple.TupleArgument
Defines an argument of logic tuple.
The argument can be a value (Value class) or a
variable (Var class). The argument can be constructed
using Value or Var - which are used only
as constructor classes; instead, the services about argument
management are provided by this class
LogicTuple,
Value,
Var, Serialized Form| Field Summary | |
protected alice.tuprolog.Term |
value
the internal representation of the argument is a (tu)Prolog term |
| Constructor Summary | |
TupleArgument()
|
|
TupleArgument(java.lang.Object t)
Constructs an argument using a generic object |
|
TupleArgument(alice.tuprolog.Term t)
Contructs a tuple argument copying a Prolog term |
|
| Method Summary | |
TupleArgument |
getArg(int index)
gets the i-arg Arg of a structured argument |
int |
getArity()
gets the number of argument of a structured argument |
float |
getFloat(int index)
Helper service to get directly a float argument inside this argument object considered as a compound value |
int |
getInt(int index)
Helper service to get directly an integer argument inside this argument object considered as a compound value |
java.lang.String |
getName()
gets the name of the arg |
java.lang.String |
getString(int index)
Helper service to get directly a string argument inside this argument object considered as a compound value |
boolean |
isFloat()
Tests if the argument is a float |
boolean |
isInt()
Tests if the argument is an integer |
boolean |
isNumber()
Tests if the argument is a number |
boolean |
isString()
Tests if the argument is a string |
boolean |
isStruct()
Tests if the argument is a structured argument |
boolean |
isValue()
Tests if the argument is a value |
boolean |
isVar()
Tests if the argument is a variable |
java.lang.String |
toString()
Gets the string representation of the argument |
alice.tuprolog.Term |
toTerm()
Gets the prolog term representation of the argument |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected alice.tuprolog.Term value
| Constructor Detail |
public TupleArgument()
public TupleArgument(alice.tuprolog.Term t)
t - the Prolog term whose content is used
to build the argumentpublic TupleArgument(java.lang.Object t)
t - the object used to construct the argument| Method Detail |
public boolean isVar()
public boolean isValue()
public boolean isString()
public boolean isNumber()
public boolean isInt()
public boolean isFloat()
public boolean isStruct()
public alice.tuprolog.Term toTerm()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
public TupleArgument getArg(int index)
public int getArity()
public java.lang.String getString(int index)
index - the position (index) of the string argumentnull otherwisepublic int getInt(int index)
index - the position (index) of the integer argumentpublic float getFloat(int index)
index - the position (index) of the integer argument
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||