Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
22521 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
3
public class LedgerValue {
4
	private int quantity;
5
	private float rate;
6
	private float value;
7
	public int getQuantity() {
8
		return quantity;
9
	}
10
	public void setQuantity(int quantity) {
11
		this.quantity = quantity;
12
	}
13
	public float getRate() {
14
		return rate;
15
	}
16
	public void setRate(float rate) {
17
		this.rate = rate;
18
	}
19
	public float getValue() {
20
		return value;
21
	}
22
	public void setValue(float value) {
23
		this.value = value;
24
	}
25
	@Override
26
	public int hashCode() {
27
		final int prime = 31;
28
		int result = 1;
29
		result = prime * result + quantity;
30
		result = prime * result + Float.floatToIntBits(rate);
31
		result = prime * result + Float.floatToIntBits(value);
32
		return result;
33
	}
34
	@Override
35
	public boolean equals(Object obj) {
36
		if (this == obj)
37
			return true;
38
		if (obj == null)
39
			return false;
40
		if (getClass() != obj.getClass())
41
			return false;
42
		LedgerValue other = (LedgerValue) obj;
43
		if (quantity != other.quantity)
44
			return false;
45
		if (Float.floatToIntBits(rate) != Float.floatToIntBits(other.rate))
46
			return false;
47
		if (Float.floatToIntBits(value) != Float.floatToIntBits(other.value))
48
			return false;
49
		return true;
50
	}
51
 
52
	@Override
53
	public String toString() {
54
		return "LadgerValue [quantity=" + quantity + ", rate=" + rate + ", value=" + value + "]";
55
	}
56
 
57
}