public final class IndexedAttributeHolder extends Object implements AttributeHolder
AttributeHolder, which supports indexed access to stored
Attributes. Access to such indexed Attributes could be as
fast as access to array.AttributeHolder,
NamedAttributeHolder| Modifier and Type | Class and Description |
|---|---|
protected class |
IndexedAttributeHolder.IndexedAttributeAccessorImpl
IndexedAttributeAccessor implementation. |
| Modifier and Type | Field and Description |
|---|---|
protected DefaultAttributeBuilder |
attributeBuilder |
protected IndexedAttributeAccessor |
indexedAttributeAccessor |
| Constructor and Description |
|---|
IndexedAttributeHolder(AttributeBuilder attributeBuilder) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all the attributes.
|
Object |
getAttribute(String name)
Return an object based on a name.
|
AttributeBuilder |
getAttributeBuilder()
Get AttributeBuilder, associated with this holder
|
Set<String> |
getAttributeNames()
Return a
Set of attribute names. |
IndexedAttributeAccessor |
getIndexedAttributeAccessor()
Returns
IndexedAttributeAccessor for accessing Attributes
by index. |
void |
recycle()
Recycle AttributeHolder
|
Object |
removeAttribute(String name)
Remove a name/value object.
|
void |
setAttribute(String name,
Object value)
Set a name/value object.
|
protected final DefaultAttributeBuilder attributeBuilder
protected final IndexedAttributeAccessor indexedAttributeAccessor
public IndexedAttributeHolder(AttributeBuilder attributeBuilder)
public Object getAttribute(String name)
getAttribute in interface AttributeHoldername - - name of an attributepublic void setAttribute(String name, Object value)
setAttribute in interface AttributeHoldername - - name of an attributevalue - - value of named attributepublic Object removeAttribute(String name)
removeAttribute in interface AttributeHoldername - - name of an attributepublic Set<String> getAttributeNames()
Set of attribute names.getAttributeNames in interface AttributeHolderSet of attribute namespublic void recycle()
recycle in interface AttributeHolderpublic void clear()
clear in interface AttributeHolderpublic AttributeBuilder getAttributeBuilder()
getAttributeBuilder in interface AttributeHolderpublic IndexedAttributeAccessor getIndexedAttributeAccessor()
IndexedAttributeAccessor for accessing Attributes
by index.getIndexedAttributeAccessor in interface AttributeHolderIndexedAttributeAccessor for accessing Attributes
by index.Copyright © 2013 Oracle Corporation. All Rights Reserved.