1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.atlassian.jira.rest.client.api.domain;
18
19 import com.atlassian.jira.rest.client.api.IdentifiableEntity;
20 import com.atlassian.jira.rest.client.api.NamedEntity;
21 import com.google.common.base.Objects;
22
23
24
25
26
27
28 public class IssueField implements NamedEntity, IdentifiableEntity<String> {
29
30 private final String id;
31 private final String name;
32 private final String type;
33 private final Object value;
34
35 public IssueField(String id, String name, String type, Object value) {
36 this.id = id;
37 this.name = name;
38 this.type = type;
39 this.value = value;
40 }
41
42 public String getId() {
43 return id;
44 }
45
46 public String getName() {
47 return name;
48 }
49
50 public String getType() {
51 return type;
52 }
53
54 public Object getValue() {
55 return value;
56 }
57
58 @Override
59 public String toString() {
60 return Objects.toStringHelper(this).
61 add("id", id).
62 add("name", name).
63 add("type", type).
64 add("value", getValue()).
65 toString();
66 }
67
68 @Override
69 public int hashCode() {
70 return Objects.hashCode(id, name, type);
71 }
72
73 @Override
74 public boolean equals(Object obj) {
75 if (obj instanceof IssueField) {
76 final IssueField that = (IssueField) obj;
77 return Objects.equal(this.id, that.id)
78 && Objects.equal(this.name, that.name)
79 && Objects.equal(this.type, that.type)
80 && Objects.equal(this.value, that.value);
81 }
82 return false;
83 }
84
85 }