|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.attributes.DefaultAttributeBuilder
public class DefaultAttributeBuilder
Default AttributeBuilder implementation.
AttributeBuilder| Field Summary | |
|---|---|
protected List<Attribute> |
attributes
|
protected Map<String,Attribute> |
name2Attribute
|
| Constructor Summary | |
|---|---|
DefaultAttributeBuilder()
|
|
| Method Summary | ||
|---|---|---|
|
createAttribute(String name)
Create Attribute with name |
|
|
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 |
|
|
createAttribute(String name,
T defaultValue)
Create Attribute with name and default value |
|
protected Attribute |
getAttributeByIndex(int index)
|
|
protected Attribute |
getAttributeByName(String name)
|
|
protected static void |
setAttributeIndex(Attribute attribute,
int index)
Method sets the index to the Attribute Could be used by classes, which extend DefaultAttributeBuilder and don't have access to the protected Attribute.setIndex() method. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Attribute> attributes
protected Map<String,Attribute> name2Attribute
| Constructor Detail |
|---|
public DefaultAttributeBuilder()
| Method Detail |
|---|
protected static void setAttributeIndex(Attribute attribute,
int index)
attribute - index - public <T> Attribute<T> createAttribute(String name)
createAttribute in interface AttributeBuilderT - Type of attribute valuename - attribute name
public <T> Attribute<T> createAttribute(String name,
T defaultValue)
createAttribute in interface AttributeBuilderT - Type of attribute valuename - attribute namedefaultValue - attribute's default value
public <T> Attribute<T> createAttribute(String name,
NullaryFunction<T> initializer)
createAttribute in interface AttributeBuilderT - Type of attribute valuename - attribute nameinitializer - NullaryFunction, which will be called, if Attribute's
value is null on a AttributedObject
protected Attribute getAttributeByName(String name)
protected Attribute getAttributeByIndex(int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||