|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBlackboard
Provide Temporary for shared collaboration between renderers and the user.
To emphais the tempoary nature we are not storing objects at this time, please see StyleBlackboard for the direction we wish to take this class. API should this interface be included?
Q: Should this class be cloneable? API explain the use of 'keys' and any uniqueness constraints (Set or List?) API X getX(key) ... should this be X get(key) and let the compiler firgure out which one to call based on the signature? API moreover, you might want to consider on 'Objects' and the use of
Method Summary | |
---|---|
void |
addAll(IBlackboard blackboard)
adds all the contents of the source blackboard to the destination blackboard |
boolean |
addListener(IBlackboardListener listener)
Adds a listener to the blackboard. |
void |
clear()
Clear the contents of this blackboard. |
boolean |
contains(java.lang.String key)
Check if blackboard has an entry for key. |
void |
flush()
Flush the contents of this blackboard. |
java.lang.Object |
get(java.lang.String key)
Returns the object value of the given key. |
java.lang.Float |
getFloat(java.lang.String key)
Returns the floating point value of the given key. |
java.lang.Integer |
getInteger(java.lang.String key)
Returns the integer value of the given key. |
java.lang.String |
getString(java.lang.String key)
Returns the string value of the given key. |
java.util.Set<java.lang.String> |
keySet()
return the set of keys on the blackboard. |
void |
put(java.lang.String key,
java.lang.Object value)
Sets the value of the given key. |
void |
putFloat(java.lang.String key,
float value)
Sets the value of the given key to the given floating point number. |
void |
putInteger(java.lang.String key,
int value)
Sets the value of the given key to the given integer. |
void |
putString(java.lang.String key,
java.lang.String value)
Sets the value of the given key to the given string. |
boolean |
removeListener(IBlackboardListener listener)
Removes a listener |
Method Detail |
---|
boolean addListener(IBlackboardListener listener)
listener
- a listener that will be notified when the blackboard changes
boolean removeListener(IBlackboardListener listener)
listener
- the listener to be removed.
boolean contains(java.lang.String key)
true
if a value is known for keyjava.lang.Object get(java.lang.String key)
key
- the key
void put(java.lang.String key, java.lang.Object value)
key
- the keyvalue
- the valuejava.lang.Float getFloat(java.lang.String key)
key
- the key
null
if the key was not found or was found but was not a
floating point numberjava.lang.Integer getInteger(java.lang.String key)
key
- the key
null
if the key was not found or was found but was not
an integerjava.lang.String getString(java.lang.String key)
key
- the key
null
if the key was not foundvoid putFloat(java.lang.String key, float value)
key
- the keyvalue
- the valuevoid putInteger(java.lang.String key, int value)
key
- the keyvalue
- the valuevoid putString(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuevoid clear()
This is a clear() method, not a dispose(), resource handling is not provided.
It is not recommend that client code store *real* (such as Images) resources on the blackboard. This is not a ImageCache that will magically handle resource management for you.
void flush()
This signals the blackboard to save any contents, and clear any cached object references.
void addAll(IBlackboard blackboard)
blackboard
- java.util.Set<java.lang.String> keySet()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |