Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
30003 tejbeer 1
package com.spice.profitmandi.dao.model;
2
 
3
public class WalletMinMaxAmountModel {
4
 
5
	private float min;
6
	private float max;
7
	private String year;
8
	private String month;
9
 
10
	public WalletMinMaxAmountModel(float min, float max, String year, String month) {
11
		super();
12
		this.min = min;
13
		this.max = max;
14
		this.year = year;
15
		this.month = month;
16
	}
17
 
18
	public float getMin() {
19
		return min;
20
	}
21
 
22
	public void setMin(float min) {
23
		this.min = min;
24
	}
25
 
26
	public float getMax() {
27
		return max;
28
	}
29
 
30
	public void setMax(float max) {
31
		this.max = max;
32
	}
33
 
34
	public String getYear() {
35
		return year;
36
	}
37
 
38
	public void setYear(String year) {
39
		this.year = year;
40
	}
41
 
42
	public String getMonth() {
43
		return month;
44
	}
45
 
46
	public void setMonth(String month) {
47
		this.month = month;
48
	}
49
 
50
	@Override
51
	public int hashCode() {
52
		final int prime = 31;
53
		int result = 1;
54
		result = prime * result + Float.floatToIntBits(max);
55
		result = prime * result + Float.floatToIntBits(min);
56
		result = prime * result + ((month == null) ? 0 : month.hashCode());
57
		result = prime * result + ((year == null) ? 0 : year.hashCode());
58
		return result;
59
	}
60
 
61
	@Override
62
	public boolean equals(Object obj) {
63
		if (this == obj)
64
			return true;
65
		if (obj == null)
66
			return false;
67
		if (getClass() != obj.getClass())
68
			return false;
69
		WalletMinMaxAmountModel other = (WalletMinMaxAmountModel) obj;
70
		if (Float.floatToIntBits(max) != Float.floatToIntBits(other.max))
71
			return false;
72
		if (Float.floatToIntBits(min) != Float.floatToIntBits(other.min))
73
			return false;
74
		if (month == null) {
75
			if (other.month != null)
76
				return false;
77
		} else if (!month.equals(other.month))
78
			return false;
79
		if (year == null) {
80
			if (other.year != null)
81
				return false;
82
		} else if (!year.equals(other.year))
83
			return false;
84
		return true;
85
	}
86
 
87
	@Override
88
	public String toString() {
89
		return "WalletMinMaxAmountModel [min=" + min + ", max=" + max + ", year=" + year + ", month=" + month + "]";
90
	}
91
 
92
}