|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--elge.agent.Situation
Situation is a simple subclass of Hashtable. It provides some functionality for very common things, that should be included in it.
Situation is used as naswer object when agents comunicate. Any agent should put some results to the situation under the keys he understand's. If the ask agent understands them too, he can get it from it.
Constructor Summary | |
Situation()
Creates a new instance of Situation |
Method Summary | |
boolean |
getBooleanResult()
Very common thing is that an agent puts a yes/no answer into the situation. |
int |
getLifeTick()
Very common method used to get the actual tick
(it's like a time for agent). if it is present. |
void |
setBooleanResult(boolean res)
Sets the result as a pair of World.RESULT -> Boolean |
void |
setLifeTick(int tick)
Sets the tick in the situaion. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Situation()
Method Detail |
public int getLifeTick()
tick
(it's like a time for agent). if it is present. Returns 0,
if the tick is not present.
public void setLifeTick(int tick)
tick
- the actual tick to set.public boolean getBooleanResult()
public void setBooleanResult(boolean res)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |