1package com.runehive.util.generic;
3import java.util.HashMap;
16 public <K, V>
void put(K key, V value) {
32 public <K, E>
void set(K key, E attribute) {
43 public <K, E>
void modify(K key, E value) {
55 public <K>
void remove(K key) {
69 public <K>
boolean has(K key) {
84 @SuppressWarnings(
"unchecked")
85 public <K, E> E
get(K key) {
88 }
catch (Exception e) {
103 @SuppressWarnings(
"unchecked")
107 }
catch (Exception e) {
126 public <K, E> E
get(K key, Class<? extends E> type) {
129 return type.cast(attribute);
130 }
catch (Exception e) {
146 public <K>
boolean is(K key) {
147 return has(key) && Boolean.TRUE ==
get(key, Boolean.class);
Holds generic attributes.
public< K, E > E get(K key)
Gets a generic attribute.
public< K, V > void put(K key, V value)
public< K, E > void modify(K key, E value)
Modifies a generic attribute.
public< K > Object getObject(K key)
Gets a generic attribute.
public< K > boolean is(K key)
Gets the state of a key.
final Map< Object, Object > genericAttributes
The map of generic attributes for an entity.
public< K > boolean has(K key)
Checks if a key is in the list of generic attribute.