001package ch.qos.logback.core.net;
002
003public class Innocent implements java.io.Serializable {
004
005    private static final long serialVersionUID = -1227008349289885025L;
006
007    int anInt;
008    Integer anInteger;
009    String aString;
010
011    public int getAnInt() {
012        return anInt;
013    }
014
015    public void setAnInt(int anInt) {
016        this.anInt = anInt;
017    }
018
019    public Integer getAnInteger() {
020        return anInteger;
021    }
022
023    public void setAnInteger(Integer anInteger) {
024        this.anInteger = anInteger;
025    }
026
027    public String getaString() {
028        return aString;
029    }
030
031    public void setaString(String aString) {
032        this.aString = aString;
033    }
034
035    @Override
036    public int hashCode() {
037        final int prime = 31;
038        int result = 1;
039        result = prime * result + ((aString == null) ? 0 : aString.hashCode());
040        result = prime * result + anInt;
041        result = prime * result + ((anInteger == null) ? 0 : anInteger.hashCode());
042        return result;
043    }
044
045    @Override
046    public boolean equals(Object obj) {
047        if (this == obj)
048            return true;
049        if (obj == null)
050            return false;
051        if (getClass() != obj.getClass())
052            return false;
053        Innocent other = (Innocent) obj;
054        if (aString == null) {
055            if (other.aString != null)
056                return false;
057        } else if (!aString.equals(other.aString))
058            return false;
059        if (anInt != other.anInt)
060            return false;
061        if (anInteger == null) {
062            if (other.anInteger != null)
063                return false;
064        } else if (!anInteger.equals(other.anInteger))
065            return false;
066        return true;
067    }
068
069}