/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 *
 * @author TienNguyen
 */
public class Product implements Comparable<Product>{
    int proId;
    String proName;
    double bore, outside, width;
    String desingation;
    int numOfSameValue;

    public int getProId() {
        return proId;
    }

    public void setProId(int proId) {
        this.proId = proId;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public double getBore() {
        return bore;
    }

    public void setBore(double bore) {
        this.bore = bore;
    }

    public double getOutside() {
        return outside;
    }

    public void setOutside(double outside) {
        this.outside = outside;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public String getDesingation() {
        return desingation;
    }

    public void setDesingation(String desingation) {
        this.desingation = desingation;
    }

    public int getNumOfSameValue() {
        return numOfSameValue;
    }

    public void setNumOfSameValue(int numOfSameValue) {
        this.numOfSameValue = numOfSameValue;
    }
    
    

    public Product(int proId, String proName, double bore, double outside, double width, String desingation) {
        this.proId = proId;
        this.proName = proName;
        this.bore = bore;
        this.outside = outside;
        this.width = width;
        this.desingation = desingation;
    }
    
    public Product(double bore, double outside, double width, String desingation, int numOfSamevalue) {
        this.bore = bore;
        this.outside = outside;
        this.width = width;
        this.desingation = desingation;
        this.numOfSameValue = numOfSamevalue;
    }
    
    public Product(double bore, double outside, double width) {
        this.bore = bore;
        this.outside = outside;
        this.width = width;
    }

    @Override
    public String toString() {
        return "Product{" + "proId=" + proId + ", proName=" + proName + ", bore=" + bore + ", outside=" + outside + ", width=" + width + ", desingation=" + desingation + ", numOfSameValue=" + numOfSameValue + '}';
    }

    @Override
    public int compareTo(Product o) {
        return Integer.valueOf(this.numOfSameValue).compareTo(o.numOfSameValue);
    }
   
    
}
