PageRenderTime 26ms CodeModel.GetById 14ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/mmeinhold/amps
Java | 57 lines | 42 code | 12 blank | 3 comment | 0 complexity | cb2f747a2c236bb169373616b3a8e4a2 MD5 | raw file
 1package com.atlassian.plugins.codegen.modules.common;
 2
 3import java.util.HashMap;
 4import java.util.Map;
 5
 6/**
 7 * @since 3.6
 8 */
 9public class Condition implements Conditional
10{
11
12    private final String fqClassName;
13    private boolean invert;
14
15    private final Map<String, String> params;
16
17    public Condition(String fqClassName)
18    {
19        this.fqClassName = fqClassName;
20        this.params = new HashMap<String, String>();
21    }
22
23    public String getFullyQualifiedClassName()
24    {
25        return fqClassName;
26    }
27
28    public Map<String, String> getParams()
29    {
30        return params;
31    }
32
33    public void addParam(String name, String value)
34    {
35        params.put(name, value);
36    }
37
38    public void setParams(Map<String, String> newParams)
39    {
40        params.putAll(newParams);
41    }
42
43    public boolean isParamsEmpty()
44    {
45        return params.isEmpty();
46    }
47
48    public boolean isInvert()
49    {
50        return invert;
51    }
52
53    public void setInvert(boolean invert)
54    {
55        this.invert = invert;
56    }
57}