|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.localallocmgr.attributes.storage.AttributeStorage
public class AttributeStorage
An object can have only one instance of some attribute. The reason for such decision lies in type-safety of the attributes. If there is a need for a group of same attributes, create a new class that handles such group. Again, the reason is purely semantical nature and the design is chosen to enforce strict types. Attribute is obtained either by enumeration or by the class name. TODO: there is no need for the IAttribute class any more!!!
Field Summary | |
---|---|
(package private) java.util.Hashtable<java.lang.Class<?>,IAttribute<?>> |
attributes
|
Constructor Summary | |
---|---|
AttributeStorage()
|
Method Summary | |
---|---|
void |
add(IAttribute<?> attribute)
|
void |
addButTimeAttribs(AttributeStorage another)
adds all attributes but time attributes (in order to leave TTElm time unchanged) |
AttributeStorage |
clone()
expected that all attributes have clones. |
boolean |
conformsTo(java.lang.Class<?> attrClass)
|
boolean |
equals(AttributeStorage another)
if this is a proper subset of another attributes, and those attributes are proper subset of these attributes, then the set of attributes are the same |
boolean |
equalsButTime(AttributeStorage another)
equal all attributes but time attributes |
IAttribute<?> |
get(java.lang.Class<?> attrClass)
|
java.util.Collection<IAttribute<?>> |
getAttributes()
|
java.util.Collection<java.lang.Class<?>> |
getAttributeTypes()
|
boolean |
has(java.lang.Class<?> type)
|
boolean |
hasJustBasicAttribs()
|
void |
remove(java.lang.Class<?> attrClass)
|
java.util.Hashtable<java.lang.Class<?>,java.lang.Object> |
toConstraints()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.util.Hashtable<java.lang.Class<?>,IAttribute<?>> attributes
Constructor Detail |
---|
public AttributeStorage()
Method Detail |
---|
public void add(IAttribute<?> attribute)
public boolean has(java.lang.Class<?> type)
public IAttribute<?> get(java.lang.Class<?> attrClass)
public void remove(java.lang.Class<?> attrClass)
public java.util.Collection<IAttribute<?>> getAttributes()
public java.util.Collection<java.lang.Class<?>> getAttributeTypes()
public boolean conformsTo(java.lang.Class<?> attrClass)
public java.util.Hashtable<java.lang.Class<?>,java.lang.Object> toConstraints()
public AttributeStorage clone()
clone
in class java.lang.Object
public void addButTimeAttribs(AttributeStorage another)
another
- public boolean equals(AttributeStorage another)
another
-
public boolean equalsButTime(AttributeStorage another)
another
-
public boolean hasJustBasicAttribs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |