Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
22549 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
22579 ashik.ali 3
public class PriceModel {
22549 ashik.ali 4
	private boolean mop;
5
	private float price;
22579 ashik.ali 6
	private float maxDiscountAmount;
22549 ashik.ali 7
 
8
	public boolean isMop() {
9
		return mop;
10
	}
11
	public void setMop(boolean mop) {
12
		this.mop = mop;
13
	}
14
	public float getPrice() {
15
		return price;
16
	}
17
	public void setPrice(float price) {
18
		this.price = price;
19
	}
22579 ashik.ali 20
 
21
	public float getMaxDiscountAmount() {
22
		return maxDiscountAmount;
23
	}
24
	public void setMaxDiscountAmount(float maxDiscountAmount) {
25
		this.maxDiscountAmount = maxDiscountAmount;
26
	}
22549 ashik.ali 27
	@Override
28
	public int hashCode() {
29
		final int prime = 31;
30
		int result = 1;
31
		result = prime * result + (mop ? 1231 : 1237);
32
		result = prime * result + Float.floatToIntBits(price);
33
		return result;
34
	}
35
	@Override
36
	public boolean equals(Object obj) {
37
		if (this == obj)
38
			return true;
39
		if (obj == null)
40
			return false;
41
		if (getClass() != obj.getClass())
42
			return false;
22579 ashik.ali 43
		PriceModel other = (PriceModel) obj;
22549 ashik.ali 44
		if (mop != other.mop)
45
			return false;
46
		if (Float.floatToIntBits(price) != Float.floatToIntBits(other.price))
47
			return false;
22579 ashik.ali 48
		if (Float.floatToIntBits(maxDiscountAmount) != Float.floatToIntBits(other.maxDiscountAmount))
49
			return false;
22549 ashik.ali 50
		return true;
51
	}
52
	@Override
53
	public String toString() {
22579 ashik.ali 54
		return "PriceModel [mop=" + mop + ", price=" + price + "maxDiscountAmount=" +maxDiscountAmount + "]";
22549 ashik.ali 55
	}
56
 
57
}