| Modifier and Type | Class and Description |
|---|---|
| public static class | AttributeRepository.
type of value stored in the attribute. T>Type safe key for storage of user attributes. |
| Modifier and Type | Method and Description |
|---|---|
| public Collection | Returns: ACollection snapshot of all the currently registered attributes in the repository
|
| public < The generic attribute type T> T | Returns: null if there is no value associated with the specified keyThe key of the attribute; must not be keynull.Returns the value of the user-defined attribute. |
| public int | |
| public static AttributeRepository | |
| public static <A> AttributeRepository | |
| public default < The generic attribute type T> T | Returns: null if there is no value associated with the specified key either in this repository or any
of its ancestors (if any available)The key of the attribute; must not be keynull.Attempts to resolve the associated value by going up the store's hierarchy (if any) |
| attributeKeys | back to summary |
|---|---|
public Collection
| |
| getAttribute | back to summary |
|---|---|
| public <T> T getAttribute(AttributeRepository. Returns the value of the user-defined attribute.
| |
| getAttributesCount | back to summary |
|---|---|
public int getAttributesCount()
| |
| ofAttributesMap | back to summary |
|---|---|
| public static AttributeRepository ofAttributesMap(Map<AttributeRepository. | |
| ofKeyValuePair | back to summary |
|---|---|
| public static <A> AttributeRepository ofKeyValuePair(AttributeRepository. | |
| resolveAttribute | back to summary |
|---|---|
| public default <T> T resolveAttribute(AttributeRepository. Attempts to resolve the associated value by going up the store's hierarchy (if any)
| |
get/set methods e.g:
public static final AttributeKey<MyValue> MY_KEY = new AttributeKey<MyValue>();
public static MyValue getMyValue(Session s) {
return s.getAttribute(MY_KEY);
}
public static void setMyValue(Session s, MyValue value) {
s.setAttribute(MY_KEY, value);
}
| Access | Constructor and Description |
|---|---|
| public |
| AttributeKey | back to summary |
|---|---|
| public AttributeKey() | |