AttributeHolder implementation, which stores Attribute values in a ConcurrentMap,
accessing them by Attribute#index().
This implementation is thread-safe.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final DefaultAttributeBuilder | |
| private final IndexedAttributeAccessor | |
| private final ConcurrentMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| attributeBuilder | back to summary |
|---|---|
| private final DefaultAttributeBuilder attributeBuilder | |
| indexedAttributeAccessor | back to summary |
|---|---|
| private final IndexedAttributeAccessor indexedAttributeAccessor | |
| valueMap | back to summary |
|---|---|
| private final ConcurrentMap<Integer, Object> valueMap | |
| IndexedMapAttributeHolder | back to summary |
|---|---|
| pack-priv IndexedMapAttributeHolder(final AttributeBuilder attributeBuilder) | |
| clear | back to summary |
|---|---|
| public void clear() Implements org. Doc from org. Clear all the attributes.
| |
| copyFrom | back to summary |
|---|---|
| public void copyFrom(final AttributeHolder srcAttributes) Implements org. Doc from org. Copies attributes from the srcAttributes to this AttributeHolder
| |
| copyTo | back to summary |
|---|---|
| public void copyTo(final AttributeHolder dstAttributes) Implements org. Doc from org. Copies attributes from this AttributeHolder to the dstAttributes.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(final String name) Implements org. Doc from org. Return an object based on a name.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(final String name, final Supplier<T> initializer) Implements org. Doc from org. Return an object based on a name.
| |
| getAttributeBuilder | back to summary |
|---|---|
| public AttributeBuilder getAttributeBuilder() Implements org. Doc from org. Get AttributeBuilder, associated with this holder
| |
| getAttributeNames | back to summary |
|---|---|
| public Set Implements org. Doc from org. Return a
| |
| getIndexedAttributeAccessor | back to summary |
|---|---|
| public IndexedAttributeAccessor getIndexedAttributeAccessor() Implements org. Returns
| |
| recycle | back to summary |
|---|---|
| public void recycle() Implements org. Doc from org. Recycle AttributeHolder
| |
| removeAttribute | back to summary |
|---|---|
| public Object removeAttribute(final String name) Implements org. Doc from org. Remove a name/value object.
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(final String name, final Object value) Implements org. Doc from org. Set a name/value object.
| |
IndexedAttributeAccessor implementation.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getAttribute(final int index)
Implements org. Internal method for dynamic attribute support. |
| public Object | getAttribute(final int index, final Supplier<T> initializer)
Implements org. Internal method for dynamic attribute support. |
| public Object | removeAttribute(final int index)
Implements org. Internal method for dynamic attribute support. |
| public void | setAttribute(final int index, final Object value)
Implements org. Internal method for dynamic attribute support. |
| IndexedAttributeAccessorImpl | back to summary |
|---|---|
| private IndexedAttributeAccessorImpl() | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(final int index) Implements org. Doc from org. Internal method for dynamic attribute support. Return the value of the attribute by index.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(final int index, final Supplier<T> initializer) Implements org. Doc from org. Internal method for dynamic attribute support. Return the value of the attribute by index. If the attribute with such index is not set, set it to the default value, using the initializer, and return the default.
| |
| removeAttribute | back to summary |
|---|---|
| public Object removeAttribute(final int index) Implements org. Doc from org. Internal method for dynamic attribute support. Removes the attribute with the index and returns its previous value.
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(final int index, final Object value) Implements org. Doc from org. Internal method for dynamic attribute support. Set the attribute with the index to value.
| |