com.sun.grizzly.attributes
Interface AttributeBuilder

All Known Implementing Classes:
DefaultAttributeBuilder

public interface AttributeBuilder

AttributeBuilder is responsible for creating and indexing Attributes. For faster access to Attribute value, each Attribute has assigned index. AttributeBuilder is responsible to assign each Attribute unique index.

Author:
Alexey Stashok
See Also:
DefaultAttributeBuilder

Method Summary
<T> Attribute<T>
createAttribute(String name)
          Create Attribute with name
<T> Attribute<T>
createAttribute(String name, NullaryFunction<T> initializer)
          Create Attribute with name and initializer, which will be called, if Attribute's value is null on a AttributedObject
<T> Attribute<T>
createAttribute(String name, T defaultValue)
          Create Attribute with name and default value
 

Method Detail

createAttribute

<T> Attribute<T> createAttribute(String name)
Create Attribute with name

Type Parameters:
T - Type of attribute value
Parameters:
name - attribute name
Returns:
Attribute

createAttribute

<T> Attribute<T> createAttribute(String name,
                                 T defaultValue)
Create Attribute with name and default value

Type Parameters:
T - Type of attribute value
Parameters:
name - attribute name
defaultValue - attribute's default value
Returns:
Attribute

createAttribute

<T> Attribute<T> createAttribute(String name,
                                 NullaryFunction<T> initializer)
Create Attribute with name and initializer, which will be called, if Attribute's value is null on a AttributedObject

Type Parameters:
T - Type of attribute value
Parameters:
name - attribute name
initializer - NullaryFunction, which will be called, if Attribute's value is null on a AttributedObject
Returns:
Attribute


Copyright © 2009 SUN Microsystems. All Rights Reserved.