|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReadEnv
A ReadEnv is a container for attributes that can be read but not changed.
The attributes are likely all stored as strings, to allow simple database storage,
but they may be retrieved as a specified type, if an AttributeConverter
for that type has been registered (via
AttributeConverters.setConverterForType(Class, AttributeConverter)
).
Method Summary | ||
---|---|---|
String |
getAttribute(String name)
Gets an attribute as a String. |
|
|
getAttribute(String name,
Class<T> type)
Returns the given attribute, transformed into the given type. |
|
|
getAttribute(String name,
Class<T> type,
T defaultValue)
Returns the given attribute, transformed into the given type. |
|
Iterable<String> |
getAttributeNames()
Returns an Iterable of attribute names. |
|
boolean |
hasAttribute(String name)
Checks if the given attribute is present. |
Method Detail |
---|
String getAttribute(String name)
name
- The name of the attribute to get
<T> T getAttribute(String name, Class<T> type)
T
- The type which the attribute should be returned as.name
- The name of the attribute to get.type
- The class type which the attribute should be transformed to.
<T> T getAttribute(String name, Class<T> type, T defaultValue)
T
- The type which the attribute should be returned as.name
- The name of the attribute to get.type
- The class type which the attribute should be transformed to.defaultValue
- The value to return if no value is set.
boolean hasAttribute(String name)
name
- Name of the attribute to check for
Iterable<String> getAttributeNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |