Package jason.asSemantics
Class Intention
java.lang.Object
jason.asSemantics.Intention
- All Implemented Interfaces:
ToDOM,Serializable,Comparable<Intention>,Iterable<IntendedMeans>
public class Intention
extends Object
implements Serializable, Comparable<Intention>, Iterable<IntendedMeans>, ToDOM
Represents and Intention (a stack of IntendedMeans).
The comparable sorts the intentions based on the atomic property:
atomic intentions comes first.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearIM()clone()intatomic intentions are grater than not atomic intentionsvoiddropGoal(IMCondition c, Unifier u) remove all IMs until the lowest IM that succeeds in test cbooleanvoidfail(Circumstance c) findEventForFailure(Trigger tevent, PlanLibrary pl, Circumstance c) get as XMLintgetId()getIM(IMCondition c, Unifier u) returns the IntendedMeans that succeeds in test c, returns null if there isn't onegetPlace()returns where the intention is in the interpreter data structures.booleaninthashCode()booleanbooleanhasTrigger(Trigger g, Unifier u) returns true if the intention has an IM where TE = g, using u to verify equalitybooleanisAtomic()booleanbooleaniterator()peek()pop()voidpush(IntendedMeans im) voidsetAtomic(int a) voidvoidvoidvoidsetSuspended(boolean b) suspended intention means suspended by the internal action .suspendvoidintsize()toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EmptyInt
-
noReason
-
-
Constructor Details
-
Intention
public Intention()
-
-
Method Details
-
setGIntention
-
getGIntention
-
getId
public int getId() -
push
-
peek
-
pop
-
isAtomic
public boolean isAtomic() -
setAtomic
public void setAtomic(int a) -
setNoInterestInUpdateEvents
public void setNoInterestInUpdateEvents() -
hasInterestInUpdateEvents
public boolean hasInterestInUpdateEvents() -
hasGoalCondition
public boolean hasGoalCondition() -
iterator
- Specified by:
iteratorin interfaceIterable<IntendedMeans>
-
isFinished
public boolean isFinished() -
size
public int size() -
clearIM
public void clearIM() -
setSuspended
public void setSuspended(boolean b) suspended intention means suspended by the internal action .suspend -
isSuspended
public boolean isSuspended() -
setSuspendedReason
-
getSuspendedReason
-
getIM
returns the IntendedMeans that succeeds in test c, returns null if there isn't one -
getBottom
-
getPlace
returns where the intention is in the interpreter data structures. It is updated by circumstance getAllIntentions. -
setPlace
-
getStateBasedOnPlace
-
hasTrigger
returns true if the intention has an IM where TE = g, using u to verify equality -
dropGoal
remove all IMs until the lowest IM that succeeds in test c -
fail
-
findEventForFailure
-
compareTo
atomic intentions are grater than not atomic intentions- Specified by:
compareToin interfaceComparable<Intention>
-
equals
-
hashCode
public int hashCode() -
clone
-
copyTo
-
toString
-
getAsTerm
-
getAsDOM
get as XML
-