Package step.core.accessors
Class AbstractOrganizableObject
- java.lang.Object
-
- step.core.accessors.AbstractIdentifiableObject
-
- step.core.accessors.AbstractOrganizableObject
-
- Direct Known Subclasses:
AbstractTrackedObject
public class AbstractOrganizableObject extends AbstractIdentifiableObject
This class extendsAbstractIdentifiableObjectand is used as parent class for all the objects that should be organized or identified by custom attributes
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>attributesstatic StringNAMEstatic StringVERSION-
Fields inherited from class step.core.accessors.AbstractIdentifiableObject
customFields, ID
-
-
Constructor Summary
Constructors Constructor Description AbstractOrganizableObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String key, String value)Add an attribute to the attribute.StringgetAttribute(String key)Map<String,String>getAttributes()booleanhasAttribute(String key)voidsetAttributes(Map<String,String> attributes)Sets the attributes used to identify this object's instance-
Methods inherited from class step.core.accessors.AbstractIdentifiableObject
addCustomField, computeCustomFieldIfAbsent, equals, getCustomField, getCustomField, getCustomFields, getId, hashCode, setCustomFields, setId
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAttributes
public Map<String,String> getAttributes()
- Returns:
- the attributes that identify this object's instance
-
setAttributes
public void setAttributes(Map<String,String> attributes)
Sets the attributes used to identify this object's instance- Parameters:
attributes- the object's attributes as key-value pairs
-
addAttribute
public void addAttribute(String key, String value)
Add an attribute to the attribute. This will initialize the map if it is null This method is not thread safe- Parameters:
key- the name of the attributevalue- the value
-
hasAttribute
public boolean hasAttribute(String key)
-
-