View Javadoc
1   package ch.qos.logback.core.net;
2   
3   public class Innocent implements java.io.Serializable {
4   
5       private static final long serialVersionUID = -1227008349289885025L;
6   
7       int anInt;
8       Integer anInteger;
9       String aString;
10  
11      public int getAnInt() {
12          return anInt;
13      }
14  
15      public void setAnInt(int anInt) {
16          this.anInt = anInt;
17      }
18  
19      public Integer getAnInteger() {
20          return anInteger;
21      }
22  
23      public void setAnInteger(Integer anInteger) {
24          this.anInteger = anInteger;
25      }
26  
27      public String getaString() {
28          return aString;
29      }
30  
31      public void setaString(String aString) {
32          this.aString = aString;
33      }
34  
35      @Override
36      public int hashCode() {
37          final int prime = 31;
38          int result = 1;
39          result = prime * result + ((aString == null) ? 0 : aString.hashCode());
40          result = prime * result + anInt;
41          result = prime * result + ((anInteger == null) ? 0 : anInteger.hashCode());
42          return result;
43      }
44  
45      @Override
46      public boolean equals(Object obj) {
47          if (this == obj)
48              return true;
49          if (obj == null)
50              return false;
51          if (getClass() != obj.getClass())
52              return false;
53          Innocent other = (Innocent) obj;
54          if (aString == null) {
55              if (other.aString != null)
56                  return false;
57          } else if (!aString.equals(other.aString))
58              return false;
59          if (anInt != other.anInt)
60              return false;
61          if (anInteger == null) {
62              if (other.anInteger != null)
63                  return false;
64          } else if (!anInteger.equals(other.anInteger))
65              return false;
66          return true;
67      }
68  
69  }