public interface HasAttributes
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns the value of the named attribute as an Object, or null if no attribute of
the given name exists.
|
<T> T |
getAttribute(String name,
Class<T> clazz)
Returns the value of the named attribute typed to the specified class, or
null if no attribute of
the given name exists. |
Iterator<String> |
getAttributeNames()
Returns an Iterator containing the names of the attributes available to this Simon.
|
Map<String,Object> |
getCopyAsSortedMap()
Returns copy of attributes as a sorted map, this can be used further for operations like
toString . |
void |
removeAttribute(String name)
Removes an attribute from this Simon.
|
void |
setAttribute(String name,
Object value)
Stores an attribute in this Simon.
|
void setAttribute(String name, Object value)
name
- a String specifying the name of the attributevalue
- the Object to be storedObject getAttribute(String name)
name
- a String specifying the name of the attributevoid removeAttribute(String name)
name
- a String specifying the name of the attribute to removeIterator<String> getAttributeNames()
Map<String,Object> getCopyAsSortedMap()
toString
.<T> T getAttribute(String name, Class<T> clazz)
null
if no attribute of
the given name exists.name
- a String specifying the name of the attributenull
if the attribute does not existCopyright © 2019. All rights reserved.