Package jason.stdlib
Class type
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.type
- All Implemented Interfaces:
- InternalAction,- Serializable
@Manual(literal=".type(argument,type)",
        hint="retrieves types of the argument or checks whether the argument is of a given type",
        argsHint={"the term to be checked","the given type or a variable to retrieves types"},
        argsType={"term","term or variable"},
        examples={".type(\"home page\",string): true",".type(b(10),string): false",".type(b,T): unifies T with the term \'atom\' and backtracks unifying T with \'literal\' and \'ground\'",".type(X,T): unifies T with the term \'free\' if X is free, or other types if X is not free"},
        seeAlso={"jason.stdlib.atom","jason.stdlib.list","jason.stdlib.literal","jason.stdlib.number","jason.stdlib.string","jason.stdlib.structure","jason.stdlib.ground"})
public class type
extends DefaultInternalAction
Internal action: .type.
  
Description: retrieves types of the argument.
Parameter:
- + argument (any term): the term to be checked.
 
- +/- type (atom or variable): the given type or a variable. Values are atoms.
 
Examples:
-  .type(\"home page\",string): true.
-  .type(b(10),string): false.
-  .type(b,T): unifies T with the term 'atom' and backtracks unifying T with 'literal' and 'ground'.
-  .type(X,T): unifies T with the term 'free' if X is free, or other types if X is not free.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic InternalActioncreate()execute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.intintMethods inherited from class jason.asSemantics.DefaultInternalActioncanBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
- 
Constructor Details- 
typepublic type()
 
- 
- 
Method Details- 
create
- 
getMinArgspublic int getMinArgs()- Overrides:
- getMinArgsin class- DefaultInternalAction
 
- 
getMaxArgspublic int getMaxArgs()- Overrides:
- getMaxArgsin class- DefaultInternalAction
 
- 
executeDescription copied from interface:InternalActionExecutes 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:
- executein interface- InternalAction
- Overrides:
- executein class- DefaultInternalAction
- Throws:
- Exception
 
 
-