package com.alwaysallthetime.adnlib.data;

import java.util.HashMap;

public class Annotation {
    private String type;
    private HashMap<String, Object> value;

    public Annotation() {
        value = new HashMap<String, Object>();
    }

    public Annotation(String type) {
        this();
        this.type = type;
    }

    public Annotation(String type, HashMap<String, Object> value) {
        this.type = type;
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public HashMap<String, Object> getValue() {
        return value;
    }

    public void setValue(HashMap<String, Object> value) {
        this.value = value;
    }

    public Object addValue(String key, Object value) {
        return this.value.put(key, value);
    }

    public Object removeValue(String key) {
        return value.remove(key);
    }
}
@@ -941,10 +941,95 @@
 );%0A    %7D
+%0A%0A    public Object getValueForKey(String key) %7B%0A        return value.get(key);%0A    %7D
 %0A%7D

add convenience method for getting a single key value