public abstract class AbstractExtensible extends Object implements Extensible
Constructor and Description |
---|
AbstractExtensible() |
AbstractExtensible(int initialAttachmentsSize,
int initialPropertiesSize) |
Modifier and Type | Method and Description |
---|---|
<T> T |
addAttachment(Class<T> clazz,
Object obj)
Add arbitrary attachments
|
<T> T |
getAttachment(Class<T> clazz)
Get an arbitrary attachment
|
Collection<Object> |
getAttachments()
Get arbitrary attachments
|
Set<String> |
getProperties()
Get the set of property names
|
Object |
getProperty(String key)
Get an property
|
<T> T |
removeAttachment(Class<T> key)
Remove arbitrary attachments
|
void |
removeProperty(String key)
Remove a property
|
void |
setProperties(Map<String,Object> props)
Set a map of properties
|
void |
setProperty(String key,
Object value)
Set a property
|
public AbstractExtensible()
public AbstractExtensible(int initialAttachmentsSize, int initialPropertiesSize)
public Collection<Object> getAttachments()
Extensible
getAttachments
in interface Extensible
public <T> T getAttachment(Class<T> clazz)
Extensible
getAttachment
in interface Extensible
T
- class type of attachmentsclazz
- identifierpublic <T> T addAttachment(Class<T> clazz, Object obj)
Extensible
addAttachment
in interface Extensible
T
- class typeclazz
- identifierobj
- valuepublic <T> T removeAttachment(Class<T> key)
Extensible
removeAttachment
in interface Extensible
T
- class type of attachmentskey
- identifierpublic Set<String> getProperties()
Extensible
getProperties
in interface Extensible
public Object getProperty(String key)
Extensible
getProperty
in interface Extensible
key
- property identifierpublic void removeProperty(String key)
Extensible
removeProperty
in interface Extensible
key
- property identifierpublic void setProperty(String key, Object value)
Extensible
setProperty
in interface Extensible
key
- property identifiervalue
- property valuepublic void setProperties(Map<String,Object> props)
Extensible
setProperties
in interface Extensible
props
- map to retainCopyright © 2017 JBoss, by Red Hat. All rights reserved.