|
|||||||||
Home >> All >> alice >> [ logictuple overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
alice.logictuple
Class TupleArgument

java.lang.Objectalice.logictuple.TupleArgument
- All Implemented Interfaces:
- java.io.Serializable
- public class TupleArgument
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
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
- Version:
- 1.0
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 |
value
protected alice.tuprolog.Term value
- the internal representation of the argument is a (tu)Prolog term
Constructor Detail |
TupleArgument
public TupleArgument()
TupleArgument
public TupleArgument(alice.tuprolog.Term t)
- Contructs a tuple argument copying a Prolog term
TupleArgument
public TupleArgument(java.lang.Object t)
- Constructs an argument using a generic object
Method Detail |
isVar
public boolean isVar()
- Tests if the argument is a variable
isValue
public boolean isValue()
- Tests if the argument is a value
isString
public boolean isString()
- Tests if the argument is a string
isNumber
public boolean isNumber()
- Tests if the argument is a number
isInt
public boolean isInt()
- Tests if the argument is an integer
isFloat
public boolean isFloat()
- Tests if the argument is a float
isStruct
public boolean isStruct()
- Tests if the argument is a structured argument
toTerm
public alice.tuprolog.Term toTerm()
- Gets the prolog term representation of the argument
toString
public java.lang.String toString()
- Gets the string representation of the argument
getName
public java.lang.String getName()
- gets the name of the arg
getArg
public TupleArgument getArg(int index)
- gets the i-arg Arg of a structured argument
getArity
public int getArity()
- gets the number of argument of a structured argument
getString
public java.lang.String getString(int index)
- Helper service to get directly a string argument inside
this argument object considered as a compound value
getInt
public int getInt(int index)
- Helper service to get directly an integer argument inside
this argument object considered as a compound value
getFloat
public float getFloat(int index)
- Helper service to get directly a float argument inside
this argument object considered as a compound value
|
|||||||||
Home >> All >> alice >> [ logictuple overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |