|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unitesk.atp.dynattrs.IndexedAttributedImpl
com.unitesk.atp.dynattrs.MapAttributed
com.unitesk.atp.dynattrs.BeanMapAttributed
public class BeanMapAttributed
The implementation of Attributed
interface that accesses attributes
through getter and setter methods according to JavaBeans
naming conventions and stores additional attributes in Map
.
Constructor Summary | |
---|---|
BeanMapAttributed()
Class constructor with HashMap as the default map. |
|
BeanMapAttributed(Map map)
Class constructor with the specified map. |
Method Summary | |
---|---|
Object |
getAttribute(String name)
Retrieves the value of a simple attribute with the specified name. |
Set |
getAttributeNames()
Returns the names of all attributes. |
boolean |
hasAttribute(String name)
Checks existence of an attribute with the specified name. |
boolean |
isRemovable(String name)
All existent attributes may be removed dynamically. |
boolean |
isWritable(String name)
Always returns true - all attributes of this class
are writable. |
void |
removeAttribute(String name)
Removes an attribute with the specified name. If there is no attribute with the specified name nothing happens. |
void |
setAttribute(String name,
Object value)
Changes the value of a simple attribute with the specified name. |
Methods inherited from class com.unitesk.atp.dynattrs.MapAttributed |
---|
addAttribute, createMap, isAttrCreatable |
Methods inherited from class com.unitesk.atp.dynattrs.IndexedAttributedImpl |
---|
getAttribute, isIndexed, setAttribute, sizeAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanMapAttributed()
HashMap
as the default map.
public BeanMapAttributed(Map map)
map
- The map to store attributes.Method Detail |
---|
public boolean hasAttribute(String name)
hasAttribute
in interface Attributed
hasAttribute
in class MapAttributed
name
- The name of an attribute.
true
if there exists an attribute with
the specified name, false
otherwise.public boolean isRemovable(String name)
isRemovable
in interface Attributed
isRemovable
in class MapAttributed
name
- The name of an attribute.
true
if an attribute with
the specified name may be removed dynamically,
false
otherwise.Attributed.hasAttribute(String)
public boolean isWritable(String name)
true
- all attributes of this class
are writable.
isWritable
in interface Attributed
isWritable
in class MapAttributed
name
- The name of an attribute.
true
if a value of an attribute with
the specified name may be changed,
false
otherwise.Attributed.hasAttribute(String)
public void removeAttribute(String name)
removeAttribute
in interface Attributed
removeAttribute
in class MapAttributed
name
- The name of an attribute.Attributed.hasAttribute(String)
,
Attributed.isRemovable(String)
public Object getAttribute(String name)
getAttribute
in interface Attributed
getAttribute
in class MapAttributed
name
- The name of an attribute.
Attributed.hasAttribute(String)
public void setAttribute(String name, Object value)
setAttribute
in interface Attributed
setAttribute
in class MapAttributed
name
- The name of an attribute.value
- The new value of an attribute.Attributed.hasAttribute(String)
,
Attributed.isWritable(String)
public Set getAttributeNames()
getAttributeNames
in interface Attributed
getAttributeNames
in class MapAttributed
Map.keySet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |