Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21612 ashik.ali 1
package com.spice.profitmandi.web.request;
2
 
21728 ashik.ali 3
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
21612 ashik.ali 4
 
5
public class CustomPaymentOption {
6
	private PaymentOptionType type;
7
	private float amount;
8
	public PaymentOptionType getType() {
9
		return type;
10
	}
11
	public void setType(PaymentOptionType type) {
12
		this.type = type;
13
	}
14
	public float getAmount() {
15
		return amount;
16
	}
17
	public void setAmount(float amount) {
18
		this.amount = amount;
19
	}
21925 ashik.ali 20
 
21
 
21680 ashik.ali 22
	@Override
21925 ashik.ali 23
	public int hashCode() {
24
		final int prime = 31;
25
		int result = 1;
26
		result = prime * result + Float.floatToIntBits(amount);
27
		result = prime * result + ((type == null) ? 0 : type.hashCode());
28
		return result;
29
	}
30
	@Override
31
	public boolean equals(Object obj) {
32
		if (this == obj)
33
			return true;
34
		if (obj == null)
35
			return false;
36
		if (getClass() != obj.getClass())
37
			return false;
38
		CustomPaymentOption other = (CustomPaymentOption) obj;
39
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
40
			return false;
41
		if (type != other.type)
42
			return false;
43
		return true;
44
	}
45
	@Override
21680 ashik.ali 46
	public String toString() {
47
		return "CustomPaymentOption [type=" + type + ", amount=" + amount + "]";
48
	}
49
 
50
 
21612 ashik.ali 51
}