Package jason.stdlib
Class time
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.time
- All Implemented Interfaces:
InternalAction,Serializable
@Manual(literal=".time(hour,minute,second,milliseconds)",
hint="gets the current time (hour, minute, seconds, and milliseconds).",
argsHint={"the hours (from 0 to 23)","the minutes (from 0 to 59)","the seconds (from 0 to 59)","the milliseconds (from 0 to 999)"},
argsType={"number","number","number","number"},
examples={".time(H,M,S): unifies H with the current hour, M with the current minutes, and S with the current seconds",".time(H,M,S,MS): unifies H with the current hour, M with the current minutes, S with the current seconds, and MS with the current milliseconds",".time(15,_,_): succeeds if it is now 3pm or a bit later but not yet 4pm"},
seeAlso={"jason.stdlib.date","jason.functions.time"})
public class time
extends DefaultInternalAction
Internal action: .time(HH,MM,SS,MS).
Description: gets the current time (hour, minute, seconds, and milliseconds).
Parameters:
- +/- hours (number): the hours (0--23).
- +/- minutes (number): the minutes (0--59).
- +/- seconds (number): the seconds (0--59).
- +/- milliseconds (number): the milliseconds (0--999).
Examples:
-
.time(H,M,S): unifies H with the current hour, M with the current minutes, and S with the current seconds. -
.time(H,M,S,MS): unifies H with the current hour, M with the current minutes, S with the current seconds, and MS with the current milliseconds. -
.time(15,_,_): succeeds if it is now 3pm or a bit later but not yet 4pm.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InternalActioncreate()execute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.intintMethods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
time
public time()
-
-
Method Details
-
create
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgsin classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgsin classDefaultInternalAction
-
execute
Description 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 interfaceInternalAction- Overrides:
executein classDefaultInternalAction- Throws:
Exception
-