Subversion Repositories SmartDukaan

Rev

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

package com.spice.profitmandi.common.model;

public class LedgerValue {
        private int quantity;
        private float rate;
        private float value;
        public int getQuantity() {
                return quantity;
        }
        public void setQuantity(int quantity) {
                this.quantity = quantity;
        }
        public float getRate() {
                return rate;
        }
        public void setRate(float rate) {
                this.rate = rate;
        }
        public float getValue() {
                return value;
        }
        public void setValue(float value) {
                this.value = value;
        }
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + quantity;
                result = prime * result + Float.floatToIntBits(rate);
                result = prime * result + Float.floatToIntBits(value);
                return result;
        }
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                LedgerValue other = (LedgerValue) obj;
                if (quantity != other.quantity)
                        return false;
                if (Float.floatToIntBits(rate) != Float.floatToIntBits(other.rate))
                        return false;
                if (Float.floatToIntBits(value) != Float.floatToIntBits(other.value))
                        return false;
                return true;
        }
        
        @Override
        public String toString() {
                return "LadgerValue [quantity=" + quantity + ", rate=" + rate + ", value=" + value + "]";
        }
        
}