Subversion Repositories SmartDukaan

Rev

Rev 21924 | Rev 22881 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21924 Rev 22009
Line 66... Line 66...
66
	
66
	
67
	@Override
67
	@Override
68
	public int hashCode() {
68
	public int hashCode() {
69
		final int prime = 31;
69
		final int prime = 31;
70
		int result = 1;
70
		int result = 1;
71
		result = prime * result + ((city == null) ? 0 : city.hashCode());
-
 
72
		result = prime * result + id;
71
		result = prime * result + id;
73
		result = prime * result + pinCode;
-
 
74
		result = prime * result + ((state == null) ? 0 : state.hashCode());
-
 
75
		return result;
72
		return result;
76
	}
73
	}
77
	@Override
74
	@Override
78
	public boolean equals(Object obj) {
75
	public boolean equals(Object obj) {
79
		if (this == obj)
76
		if (this == obj)
Line 81... Line 78...
81
		if (obj == null)
78
		if (obj == null)
82
			return false;
79
			return false;
83
		if (getClass() != obj.getClass())
80
		if (getClass() != obj.getClass())
84
			return false;
81
			return false;
85
		PostOffice other = (PostOffice) obj;
82
		PostOffice other = (PostOffice) obj;
86
		if (city == null) {
-
 
87
			if (other.city != null)
-
 
88
				return false;
-
 
89
		} else if (!city.equals(other.city))
-
 
90
			return false;
-
 
91
		if (id != other.id)
83
		if (id != other.id)
92
			return false;
84
			return false;
93
		if (pinCode != other.pinCode)
-
 
94
			return false;
-
 
95
		if (state == null) {
-
 
96
			if (other.state != null)
-
 
97
				return false;
-
 
98
		} else if (!state.equals(other.state))
-
 
99
			return false;
-
 
100
		return true;
85
		return true;
101
	}
86
	}
102
	@Override
87
	@Override
103
	public String toString() {
88
	public String toString() {
104
		return "PostOffice [id=" + id + ", pinCode=" + pinCode + ", city=" + city + ", state=" + state + "]";
89
		return "PostOffice [id=" + id + ", pinCode=" + pinCode + ", city=" + city + ", state=" + state + "]";