public interface AttributeHolder
Attribute
s.IndexedAttributeHolder
,
NamedAttributeHolder
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all the attributes.
|
void |
copyFrom(AttributeHolder srcAttributes)
Copies attributes from the srcAttributes to this AttributeHolder
|
void |
copyTo(AttributeHolder dstAttributes)
Copies attributes from this AttributeHolder to the dstAttributes.
|
Object |
getAttribute(String name)
Return an object based on a name.
|
Object |
getAttribute(String name,
NullaryFunction initializer)
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()
If AttributeHolder supports attribute access by index - it will return
an
IndexedAttributeAccessor , which will make Attribute
access as fast as access to array element. |
void |
recycle()
Recycle AttributeHolder
|
Object |
removeAttribute(String name)
Remove a name/value object.
|
void |
setAttribute(String name,
Object value)
Set a name/value object.
|
Object removeAttribute(String name)
name
- - name of an attributevoid setAttribute(String name, Object value)
name
- - name of an attributevalue
- - value of named attributeObject getAttribute(String name)
name
- - name of an attributeObject getAttribute(String name, NullaryFunction initializer)
name
- - name of an attributeinitializer
- the initializer to be used to assign a default attribute value,
in case it hasn't been assignedSet<String> getAttributeNames()
Set
of attribute names.Set
of attribute namesvoid clear()
void recycle()
AttributeBuilder getAttributeBuilder()
IndexedAttributeAccessor getIndexedAttributeAccessor()
IndexedAttributeAccessor
, which will make Attribute
access as fast as access to array element.IndexedAttributeAccessor
.void copyTo(AttributeHolder dstAttributes)
dstAttributes
- void copyFrom(AttributeHolder srcAttributes)
srcAttributes
- Copyright © 2015 Oracle Corporation. All rights reserved.