|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.almendra.commons.TAttribute
public class TAttribute
Trait that implements a class to which user-defined attributes can be added at runtime. For a further introduction into traits see http://www.iam.unibe.ch/~scg/Research/Traits/
Field Summary | |
---|---|
protected java.util.Map |
attributes
Map that holds values of attributes for a given key. |
Constructor Summary | |
---|---|
TAttribute()
Creates a new TAttribute object. |
Method Summary | |
---|---|
java.lang.Object |
getAttributeValue(java.lang.String attributeName)
Return the value of the attribute. |
boolean |
hasAttribute(java.lang.String attributeName)
Answer whether an attribute with a given name is defined. |
void |
setAttributeValue(java.lang.String attributeName,
java.lang.Object value)
Set the value of an attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map attributes
Constructor Detail |
---|
public TAttribute()
TAttribute
object.
Method Detail |
---|
public void setAttributeValue(java.lang.String attributeName, java.lang.Object value)
attributeName
- the name of the attributevalue
- the value to be setpublic java.lang.Object getAttributeValue(java.lang.String attributeName)
attributeName
-
public boolean hasAttribute(java.lang.String attributeName)
attributeName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |