public class AttributesDefinition extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,AttributeConverter<? extends Object>> |
converters |
protected List<String> |
primaries |
protected List<String> |
secondaries |
| Constructor and Description |
|---|
AttributesDefinition() |
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(String name,
Object value)
Convert an attribute into the right type.
|
List<String> |
getPrimaryAttributes()
Return the primary attributes names.
|
List<String> |
getSecondaryAttributes()
Return the secondary attributes names.
|
protected void |
primary(String name,
AttributeConverter<? extends Object> converter)
Add an attribute as a primary one and its converter.
|
protected void |
secondary(String name,
AttributeConverter<? extends Object> converter)
Add an attribute as a secondary one and its converter.
|
protected Map<String,AttributeConverter<? extends Object>> converters
public List<String> getPrimaryAttributes()
public List<String> getSecondaryAttributes()
protected void primary(String name, AttributeConverter<? extends Object> converter)
name - name of the attributeconverter - converterprotected void secondary(String name, AttributeConverter<? extends Object> converter)
name - name of the attributeconverter - converterpublic Object convert(String name, Object value)
name - name of the attributevalue - value of the attributeCopyright © 2017. All Rights Reserved.