|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAttributeStore
Base interface for all API objects with attributes
| Method Summary | |
|---|---|
Object |
getAttribute(String name)
Return the value for a given attribute. |
Object |
getAttribute(String name,
Object defaultValue)
Return the value for a given attribute and set it if it doesn't exist. |
Set<String> |
getAttributeNames()
Get the attribute names. |
Map<String,Object> |
getAttributes()
Get the attributes. |
boolean |
hasAttribute(String name)
Check the object has an attribute. |
boolean |
removeAttribute(String name)
Remove an attribute. |
void |
removeAttributes()
Remove all attributes. |
boolean |
setAttribute(String name,
Object value)
Set an attribute on this object. |
void |
setAttributes(IAttributeStore values)
Set multiple attributes on this object. |
void |
setAttributes(Map<String,Object> values)
Set multiple attributes on this object. |
| Method Detail |
|---|
Set<String> getAttributeNames()
getAttributeNames in interface AttributeStoreMBeanMap<String,Object> getAttributes()
getAttributes in interface AttributeStoreMBean
boolean setAttribute(String name,
Object value)
setAttribute in interface AttributeStoreMBeanname - the name of the attribute to changevalue - the new value of the attribute
void setAttributes(Map<String,Object> values)
values - the attributes to setvoid setAttributes(IAttributeStore values)
values - the attributes to setObject getAttribute(String name)
getAttribute in interface AttributeStoreMBeanname - the name of the attribute to get
Object getAttribute(String name,
Object defaultValue)
This is a utility function that internally performs the following code:
if (!hasAttribute(name)) setAttribute(name, defaultValue);
return getAttribute(name);
getAttribute in interface AttributeStoreMBeanname - the name of the attribute to getdefaultValue - the value of the attribute to set if the attribute doesn't
exist
boolean hasAttribute(String name)
hasAttribute in interface AttributeStoreMBeanname - the name of the attribute to check
boolean removeAttribute(String name)
removeAttribute in interface AttributeStoreMBeanname - the name of the attribute to remove
void removeAttributes()
removeAttributes in interface AttributeStoreMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||