Modifier and Type | Field and Description |
---|---|
protected HashMap<String,Object> |
properties |
Constructor and Description |
---|
Properties() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyListener(PropertyListener listener)
Registers the specified property listener to this node.
|
Object |
getProperty(String key)
Returns the property stored under the specified key.
|
boolean |
hasProperty(String key)
Returns the property stored under the specified key.
|
void |
removeProperty(String key)
Removes the specified property.
|
void |
removePropertyListener(PropertyListener listener)
Unregisters the specified property listener for this node.
|
void |
setProperty(String key,
Object value)
Stores the specified property (
value ) under the specified name
(key ). |
public void addPropertyListener(PropertyListener listener)
listener
- The movement listener.public void removePropertyListener(PropertyListener listener)
listener
- The property listener.public Object getProperty(String key)
key
- The property key.Object
corresponding to the provided keypublic void setProperty(String key, Object value)
value
) under the specified name
(key
).key
- The property name.value
- The property value.public void removeProperty(String key)
key
- The property key.public boolean hasProperty(String key)
key
- The property key.true
is the provided key corresponds to a known propery, false
otherwise.