Package jason.stdlib
Class term2string
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.term2string
- All Implemented Interfaces:
InternalAction
,Serializable
@Manual(literal=".term2string(term,string)",
hint="converts the term into a string and vice-versa",
argsHint={"the term","the string"},
argsType={"term","string"},
examples={".term2string(b,\"b\"): true",".term2string(b,X): unifies X with \"b\"",".term2string(X,\"b\"): unifies X with b",".term2string(X,\"10\"): unifies X with 10 (a number term)"},
seeAlso={"jason.stdlib.concat","jason.stdlib.delete","jason.stdlib.length","jason.stdlib.reverse"})
public class term2string
extends DefaultInternalAction
Internal action: .term2string(T,S)
.
Description: converts the term T into a string S and vice-versa.
Parameters:
- -/+ T (any term).
- -/+ S (a string).
Examples:
-
.term2string(b,"b")
: true. -
.term2string(b,X)
: unifies X with "b". -
.term2string(X,"b")
: unifies X with b. -
.term2string(X,"10")
: unifies X with 10 (a number term).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InternalAction
create()
execute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.int
int
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
term2string
public term2string()
-
-
Method Details
-
create
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgs
in classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgs
in classDefaultInternalAction
-
execute
Description copied from interface:InternalAction
Executes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action). - Specified by:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
Exception
-