1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.atlassian.jira.rest.client.domain;
18
19 import com.google.common.base.Objects;
20 import org.joda.time.DateTime;
21
22
23
24
25
26
27 public class ChangelogGroup {
28 private final BasicUser author;
29 private final DateTime created;
30 private final Iterable<ChangelogItem> items;
31
32 public ChangelogGroup(BasicUser author, DateTime created, Iterable<ChangelogItem> items) {
33 this.author = author;
34 this.created = created;
35 this.items = items;
36 }
37
38 public BasicUser getAuthor() {
39 return author;
40 }
41
42 public DateTime getCreated() {
43 return created;
44 }
45
46 public Iterable<ChangelogItem> getItems() {
47 return items;
48 }
49
50 @Override
51 public boolean equals(Object obj) {
52 if (obj instanceof ChangelogGroup) {
53 ChangelogGroup that = (ChangelogGroup) obj;
54 return Objects.equal(this.author, that.author)
55 && Objects.equal(this.created, that.created)
56 && Objects.equal(this.items, that.items);
57 }
58 return false;
59 }
60
61 @Override
62 public int hashCode() {
63 return Objects.hashCode(author, created, items);
64 }
65
66 @Override
67 public String toString() {
68 return Objects.toStringHelper(this)
69 .add("author", author)
70 .add("created", created)
71 .add("items", items)
72 .toString();
73 }
74 }