package com.ssj.bean.kmt.kmt.model;

import org.apache.commons.lang3.builder.CompareToBuilder;

import java.io.Serializable;

public class NumModel  implements Comparable<NumModel>, Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6602913770965846825L;

	private String id;
	
	private String num;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}
	
	public void concat(String[] num,int index){
		if(num.length>index){
			this.num=this.num+num[index];
		}else{
			this.num=this.num+"0";
		}	
	}

	@Override
	public int compareTo(NumModel o) {
		return new CompareToBuilder().append(Integer.parseInt(num), Integer.parseInt(o.num)).toComparison();
	}
	 
	
	
}
