View Javadoc
1   // Generated by delombok at Fri Apr 02 06:02:09 UTC 2021
2   package org.projectlombok.test;
3   
4   import org.slf4j.Logger;
5   import org.slf4j.LoggerFactory;
6   
7   public class DataExample {
8       private static final Logger LOGGER = LoggerFactory.getLogger(DataExample.class);
9       private final String name;
10      private int age;
11      private double score;
12      private String[] tags;
13  
14  
15      public static class Exercise<T> {
16          private final String name;
17          private final T value;
18  
19          @Override
20          @SuppressWarnings("all")
21          public String toString() {
22              return "DataExample.Exercise(name=" + this.getName() + ", value=" + this.getValue() + ")";
23          }
24  
25          @SuppressWarnings("all")
26          private Exercise(final String name, final T value) {
27              this.name = name;
28              this.value = value;
29          }
30  
31          @SuppressWarnings("all")
32          public static <T> DataExample.Exercise<T> of(final String name, final T value) {
33              return new DataExample.Exercise<T>(name, value);
34          }
35  
36          @SuppressWarnings("all")
37          public String getName() {
38              return this.name;
39          }
40  
41          @SuppressWarnings("all")
42          public T getValue() {
43              return this.value;
44          }
45  
46          @Override
47          @SuppressWarnings("all")
48          public boolean equals(final Object o) {
49              if (o == this) return true;
50              if (!(o instanceof DataExample.Exercise)) return false;
51              final DataExample.Exercise<?> other = (DataExample.Exercise<?>) o;
52              if (!other.canEqual((Object) this)) return false;
53              final Object this$name = this.getName();
54              final Object other$name = other.getName();
55              if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
56              final Object this$value = this.getValue();
57              final Object other$value = other.getValue();
58              if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
59              return true;
60          }
61  
62          @SuppressWarnings("all")
63          protected boolean canEqual(final Object other) {
64              return other instanceof DataExample.Exercise;
65          }
66  
67          @Override
68          @SuppressWarnings("all")
69          public int hashCode() {
70              final int PRIME = 59;
71              int result = 1;
72              final Object $name = this.getName();
73              result = result * PRIME + ($name == null ? 43 : $name.hashCode());
74              final Object $value = this.getValue();
75              result = result * PRIME + ($value == null ? 43 : $value.hashCode());
76              return result;
77          }
78      }
79  
80      @SuppressWarnings("all")
81      public DataExample(final String name) {
82          this.name = name;
83      }
84  
85      @SuppressWarnings("all")
86      public String getName() {
87          return this.name;
88      }
89  
90      @SuppressWarnings("all")
91      public int getAge() {
92          return this.age;
93      }
94  
95      @SuppressWarnings("all")
96      public double getScore() {
97          return this.score;
98      }
99  
100     @SuppressWarnings("all")
101     public String[] getTags() {
102         return this.tags;
103     }
104 
105     @SuppressWarnings("all")
106     public void setScore(final double score) {
107         this.score = score;
108     }
109 
110     @SuppressWarnings("all")
111     public void setTags(final String[] tags) {
112         this.tags = tags;
113     }
114 
115     @Override
116     @SuppressWarnings("all")
117     public boolean equals(final Object o) {
118         if (o == this) return true;
119         if (!(o instanceof DataExample)) return false;
120         final DataExample./../org/projectlombok/test/DataExample.html#DataExample">DataExample other = (DataExample) o;
121         if (!other.canEqual((Object) this)) return false;
122         if (this.getAge() != other.getAge()) return false;
123         if (Double.compare(this.getScore(), other.getScore()) != 0) return false;
124         final Object this$name = this.getName();
125         final Object other$name = other.getName();
126         if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
127         if (!java.util.Arrays.deepEquals(this.getTags(), other.getTags())) return false;
128         return true;
129     }
130 
131     @SuppressWarnings("all")
132     protected boolean canEqual(final Object other) {
133         return other instanceof DataExample;
134     }
135 
136     @Override
137     @SuppressWarnings("all")
138     public int hashCode() {
139         final int PRIME = 59;
140         int result = 1;
141         result = result * PRIME + this.getAge();
142         final long $score = Double.doubleToLongBits(this.getScore());
143         result = result * PRIME + (int) ($score >>> 32 ^ $score);
144         final Object $name = this.getName();
145         result = result * PRIME + ($name == null ? 43 : $name.hashCode());
146         result = result * PRIME + java.util.Arrays.deepHashCode(this.getTags());
147         return result;
148     }
149 
150     @Override
151     @SuppressWarnings("all")
152     public String toString() {
153         return "DataExample(name=" + this.getName() + ", age=" + this.getAge() + ", score=" + this.getScore() + ", tags=" + java.util.Arrays.deepToString(this.getTags()) + ")";
154     }
155 
156     @SuppressWarnings("all")
157     void setAge(final int age) {
158         this.age = age;
159     }
160 }