PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/plugin-module-codegen-engine/src/main/java/com/atlassian/plugins/codegen/modules/common/Label.java

https://bitbucket.org/mmeinhold/amps
Java | 53 lines | 41 code | 9 blank | 3 comment | 0 complexity | 427a8f156938be67510ce1f6105af0a0 MD5 | raw file
 1package com.atlassian.plugins.codegen.modules.common;
 2
 3import java.util.Collections;
 4import java.util.HashMap;
 5import java.util.Map;
 6
 7/**
 8 * @since 3.6
 9 */
10public class Label
11{
12    private String key;
13    private String value;
14    private Map<String, String> params;
15
16    public Label(String key, String value)
17    {
18        this.key = key;
19        this.value = value;
20        this.params = new HashMap<String, String>();
21    }
22
23    public String getKey()
24    {
25        return key;
26    }
27
28    public void setKey(String key)
29    {
30        this.key = key;
31    }
32
33    public Map<String, String> getParams()
34    {
35        return Collections.unmodifiableMap(params);
36    }
37
38    public void addParam(String value)
39    {
40        String paramName = "param" + params.size();
41        params.put(paramName, value);
42    }
43
44    public String getValue()
45    {
46        return value;
47    }
48
49    public void setValue(String value)
50    {
51        this.value = value;
52    }
53}