Subversion Repositories SmartDukaan

Rev

Rev 21894 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21894 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
3
public class GstRate {
4
	private float igstRate;
5
	private float cgstRate;
6
	private float sgstRate;
7
	private String hsnCode;
8
	public float getIgstRate() {
9
		return igstRate;
10
	}
11
	public void setIgstRate(float igstRate) {
12
		this.igstRate = igstRate;
13
	}
14
	public float getCgstRate() {
15
		return cgstRate;
16
	}
17
	public void setCgstRate(float cgstRate) {
18
		this.cgstRate = cgstRate;
19
	}
20
	public float getSgstRate() {
21
		return sgstRate;
22
	}
23
	public void setSgstRate(float sgstRate) {
24
		this.sgstRate = sgstRate;
25
	}
26
	public String getHsnCode() {
27
		return hsnCode;
28
	}
29
	public void setHsnCode(String hsnCode) {
30
		this.hsnCode = hsnCode;
31
	}
21923 ashik.ali 32
 
21894 ashik.ali 33
	@Override
21923 ashik.ali 34
	public int hashCode() {
35
		final int prime = 31;
36
		int result = 1;
37
		result = prime * result + Float.floatToIntBits(cgstRate);
38
		result = prime * result + ((hsnCode == null) ? 0 : hsnCode.hashCode());
39
		result = prime * result + Float.floatToIntBits(igstRate);
40
		result = prime * result + Float.floatToIntBits(sgstRate);
41
		return result;
42
	}
43
	@Override
44
	public boolean equals(Object obj) {
45
		if (this == obj)
46
			return true;
47
		if (obj == null)
48
			return false;
49
		if (getClass() != obj.getClass())
50
			return false;
51
		GstRate other = (GstRate) obj;
52
		if (Float.floatToIntBits(cgstRate) != Float.floatToIntBits(other.cgstRate))
53
			return false;
54
		if (hsnCode == null) {
55
			if (other.hsnCode != null)
56
				return false;
57
		} else if (!hsnCode.equals(other.hsnCode))
58
			return false;
59
		if (Float.floatToIntBits(igstRate) != Float.floatToIntBits(other.igstRate))
60
			return false;
61
		if (Float.floatToIntBits(sgstRate) != Float.floatToIntBits(other.sgstRate))
62
			return false;
63
		return true;
64
	}
65
	@Override
21894 ashik.ali 66
	public String toString() {
67
		return "GstRate [igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
68
				+ hsnCode + "]";
69
	}
70
 
71
}