Subversion Repositories SmartDukaan

Rev

View as "text/plain" | Blame | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.model;

public class WalletMinMaxAmountModel {

        private float min;
        private float max;
        private String year;
        private String month;

        public WalletMinMaxAmountModel(float min, float max, String year, String month) {
                super();
                this.min = min;
                this.max = max;
                this.year = year;
                this.month = month;
        }

        public float getMin() {
                return min;
        }

        public void setMin(float min) {
                this.min = min;
        }

        public float getMax() {
                return max;
        }

        public void setMax(float max) {
                this.max = max;
        }

        public String getYear() {
                return year;
        }

        public void setYear(String year) {
                this.year = year;
        }

        public String getMonth() {
                return month;
        }

        public void setMonth(String month) {
                this.month = month;
        }

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + Float.floatToIntBits(max);
                result = prime * result + Float.floatToIntBits(min);
                result = prime * result + ((month == null) ? 0 : month.hashCode());
                result = prime * result + ((year == null) ? 0 : year.hashCode());
                return result;
        }

        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                WalletMinMaxAmountModel other = (WalletMinMaxAmountModel) obj;
                if (Float.floatToIntBits(max) != Float.floatToIntBits(other.max))
                        return false;
                if (Float.floatToIntBits(min) != Float.floatToIntBits(other.min))
                        return false;
                if (month == null) {
                        if (other.month != null)
                                return false;
                } else if (!month.equals(other.month))
                        return false;
                if (year == null) {
                        if (other.year != null)
                                return false;
                } else if (!year.equals(other.year))
                        return false;
                return true;
        }

        @Override
        public String toString() {
                return "WalletMinMaxAmountModel [min=" + min + ", max=" + max + ", year=" + year + ", month=" + month + "]";
        }

}