public interface Attachable
Modifier and Type | Method and Description |
---|---|
<T> void | addToAttachmentList(AttachmentKey<AttachmentList<T>> key, T value) Add a value to a list-typed attachment key. |
<T> T | getAttachment(AttachmentKey<T> key) Get an attachment value. |
<T> List<T> | getAttachmentList(AttachmentKey<? extends List<T>> key) Gets a list attachment value. |
<T> T | putAttachment(AttachmentKey<T> key, T value) Set an attachment value. |
<T> T | removeAttachment(AttachmentKey<T> key) Remove an attachment, returning its previous value. |
<T> T getAttachment(AttachmentKey<T> key)
null
is returned.T
- the value typekey
- the attachment keynull
if there is none<T> List<T> getAttachmentList(AttachmentKey<? extends List<T>> key)
T
- the value typekey
- the attachment key<T> T putAttachment(AttachmentKey<T> key, T value)
null
, the attachment key is removed.T
- the value typekey
- the attachment keyvalue
- the new valuenull
if there was none<T> T removeAttachment(AttachmentKey<T> key)
T
- the value typekey
- the attachment keynull
if there was none<T> void addToAttachmentList(AttachmentKey<AttachmentList<T>> key, T value)
T
- the list value typekey
- the attachment keyvalue
- the value to addCopyright © 2015 JBoss by Red Hat. All rights reserved.