be.ugent.caagt.swirl.commands
Class AttributedContext
java.lang.Object
be.ugent.caagt.swirl.commands.AttributedContext
public class AttributedContext
extends java.lang.Object
Context object for use with
org.pietschy.command.CommandManager
. Provides
a way to store and retrieve attributes using string keys.
Important note: work on this part of the Swirl library will be
discontinued because unfortunately newer versions
of the
GUI commands framework will no longer be available as
open source.
In due course this class will become deprecated and will eventually be
removed from the library.
Object | getAttribute(String key) - Retrieve the attribute with the given key.
|
void | setAttribute(String key, Object value) - Stores an attribute with the given key.
|
AttributedContext
public AttributedContext()
Create a context of this type without any keys.
getAttribute
public Object getAttribute(String key)
Retrieve the attribute with the given key. A null key is not allowed.
- Attribute with the given key or
null
if no such attribute
exists in this context.
setAttribute
public void setAttribute(String key,
Object value)
Stores an attribute with the given key. If an attribute with that key
already exists in this context, the old value is replaced
by the value given. Setting an attribute value to null
removes the attribute.