|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.action.input.Condition
public class Condition
This is used by Participants to communicate the current situation to their
Behaviors. This can also be used by Behaviors to store variables related to
their decision making process.
API Stability: Alpha.
Constructor Summary | |
---|---|
Condition()
Constructs a new, blank Condition. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Copies this Condition. |
java.lang.Object |
get(java.lang.String key)
Returns the value associated with key. |
boolean |
hasKey(java.lang.String key)
Determines if the given key has a value associated with it. |
boolean |
hasValue(java.lang.Object value)
Determines if the given value has a key associated with it. |
boolean |
isEmpty()
Determines if there are no key-value pairs. |
java.util.Iterator |
keyIterator()
Provides an Iterator for the keys. |
java.lang.Object |
remove(java.lang.String key)
Removes the key-value pairing for the given key. |
java.lang.Object |
set(java.lang.String key,
java.lang.Object value)
Sets the given key equal to value. |
void |
setAll(Condition c)
Duplicates all of the key-value pairs in c into this Condition. |
int |
size()
Returns the number of key-value pairs currently set. |
java.util.Iterator |
valueIterator()
Provides an Iterator for the values. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Condition()
Method Detail |
---|
public java.lang.Object set(java.lang.String key, java.lang.Object value)
key
- the String key to set.value
- the value to associate with key.
java.lang.NullPointerException
- if either key or value are null.public java.lang.Object get(java.lang.String key)
key
- the String key.
public java.lang.Object remove(java.lang.String key)
key
- the String key.
public int size()
public boolean hasKey(java.lang.String key)
key
- the String key.
public boolean hasValue(java.lang.Object value)
value
- the value.
public java.util.Iterator keyIterator()
public java.util.Iterator valueIterator()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean isEmpty()
public void setAll(Condition c)
c
- the Condition object to duplicate key-value pairs from.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |