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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearIM()
clone()
int
atomic intentions are grater than not atomic intentionsvoid
dropGoal
(IMCondition c, Unifier u) remove all IMs until the lowest IM that succeeds in test cboolean
void
fail
(Circumstance c) findEventForFailure
(Trigger tevent, PlanLibrary pl, Circumstance c) get as XMLint
getId()
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.boolean
int
hashCode()
boolean
boolean
hasTrigger
(Trigger g, Unifier u) returns true if the intention has an IM where TE = g, using u to verify equalityboolean
isAtomic()
boolean
boolean
iterator()
peek()
pop()
void
push
(IntendedMeans im) void
setAtomic
(int a) void
void
void
void
setSuspended
(boolean b) suspended intention means suspended by the internal action .suspendvoid
int
size()
toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
iterator
in 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:
compareTo
in interfaceComparable<Intention>
-
equals
-
hashCode
public int hashCode() -
clone
-
copyTo
-
toString
-
getAsTerm
-
getAsDOM
get as XML
-