1
2 package org.projectlombok.test;
3
4
5
6 import javax.validation.constraints.NotNull;
7 import javax.xml.bind.annotation.XmlEnum;
8 import javax.xml.bind.annotation.XmlEnumValue;
9 import javax.xml.bind.annotation.XmlType;
10 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory;
12
13 public class AnotherDataExample implements Useful {
14 private static final Logger LOGGER = LoggerFactory.getLogger(AnotherDataExample.class);
15
16 private final DataExample dataExample;
17 @NotNull
18 private final String moreInformation;
19
20 public void doSomething() {
21 LOGGER.debug("Doing something useful...");
22 }
23
24
25 @XmlType
26 @XmlEnum(Integer.class)
27 public enum Coin {
28 @XmlEnumValue("1")
29 PENNY(1), @XmlEnumValue("5")
30 NICKEL(5), @XmlEnumValue("10")
31 DIME(10), @XmlEnumValue("25")
32 QUARTER(25);
33 private final int cents;
34
35 Coin(final int cents) {
36 this.cents = cents;
37 }
38
39 public int getCents() {
40 return cents;
41 }
42 }
43
44 @SuppressWarnings("all")
45 public AnotherDataExample(final DataExample dataExample, final String moreInformation) {
46 this.dataExample = dataExample;
47 this.moreInformation = moreInformation;
48 }
49
50 @SuppressWarnings("all")
51 public DataExample getDataExample() {
52 return this.dataExample;
53 }
54
55 @SuppressWarnings("all")
56 public String getMoreInformation() {
57 return this.moreInformation;
58 }
59
60 @Override
61 @SuppressWarnings("all")
62 public boolean equals(final Object o) {
63 if (o == this) return true;
64 if (!(o instanceof AnotherDataExample)) return false;
65 final AnotherDataExampleg/projectlombok/test/AnotherDataExample.html#AnotherDataExample">AnotherDataExample other = (AnotherDataExample) o;
66 if (!other.canEqual((Object) this)) return false;
67 final Object this$dataExample = this.getDataExample();
68 final Object other$dataExample = other.getDataExample();
69 if (this$dataExample == null ? other$dataExample != null : !this$dataExample.equals(other$dataExample)) return false;
70 final Object this$moreInformation = this.getMoreInformation();
71 final Object other$moreInformation = other.getMoreInformation();
72 if (this$moreInformation == null ? other$moreInformation != null : !this$moreInformation.equals(other$moreInformation)) return false;
73 return true;
74 }
75
76 @SuppressWarnings("all")
77 protected boolean canEqual(final Object other) {
78 return other instanceof AnotherDataExample;
79 }
80
81 @Override
82 @SuppressWarnings("all")
83 public int hashCode() {
84 final int PRIME = 59;
85 int result = 1;
86 final Object $dataExample = this.getDataExample();
87 result = result * PRIME + ($dataExample == null ? 43 : $dataExample.hashCode());
88 final Object $moreInformation = this.getMoreInformation();
89 result = result * PRIME + ($moreInformation == null ? 43 : $moreInformation.hashCode());
90 return result;
91 }
92
93 @Override
94 @SuppressWarnings("all")
95 public String toString() {
96 return "AnotherDataExample(dataExample=" + this.getDataExample() + ", moreInformation=" + this.getMoreInformation() + ")";
97 }
98 }