1 package com.atlassian.plugin.webresource;
2
3 import com.atlassian.util.concurrent.NotNull;
4 import com.google.common.collect.ImmutableMap;
5
6 import java.util.Map;
7
8
9
10
11
12
13 class PluginResourceBatchParams
14 {
15 private final String type;
16 private final Map<String, String> parameters;
17
18 public PluginResourceBatchParams(@NotNull String type, @NotNull Map<String, String> parameters)
19 {
20 this.type = type;
21 this.parameters = ImmutableMap.copyOf(parameters);
22 }
23
24 public String getType()
25 {
26 return type;
27 }
28
29 public Map<String, String> getParameters()
30 {
31 return parameters;
32 }
33
34 @Override
35 public boolean equals(Object o)
36 {
37 if (this == o) return true;
38 if (o == null || getClass() != o.getClass()) return false;
39
40 PluginResourceBatchParams that = (PluginResourceBatchParams) o;
41
42 if (!parameters.equals(that.parameters)) return false;
43 if (!type.equals(that.type)) return false;
44
45 return true;
46 }
47
48 @Override
49 public int hashCode()
50 {
51 int result = type.hashCode();
52 result = 91 * result + parameters.hashCode();
53 return result;
54 }
55 }