/**
 * <p>Copyright:Copyright(c) 2017</p>
 * <p>Company:上海中信信息发展股份有限公司</p>
 * <p>包名:com.cesgroup.cesmonitor.bean</p>
 * <p>文件名:Usability.java</p>
 * <p>创建时间:2017年5月15日 下午7:27:42</p>
 * <p>作者:user</p>
 */

package com.cesgroup.cesmonitor.screenbean;

import java.io.Serializable;

/**
 *
 * @author user
 * @version 1.0.0 2017年5月15日
 */
public class Usability implements Serializable, Comparable<Usability> {

    /**
     *
     */
    private static final long serialVersionUID = 3594961029050552060L;

    private String name;

    private Float showsla;

    private Integer serviceid;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Float getShowsla() {
        return showsla;
    }

    public void setShowsla(Float showsla) {
        this.showsla = showsla;
    }

    public Integer getServiceid() {
        return serviceid;
    }

    public void setServiceid(Integer serviceid) {
        this.serviceid = serviceid;
    }

    /**
     * 构造函数
     */
    public Usability() {
        super();
    }

    /**
     *
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    @Override
    public int compareTo(Usability usability) {
        if (this == usability) {
            return 0;
        } else if (usability != null && usability instanceof Usability) {
            Usability d = usability;
            if (this.showsla < d.showsla) {
                return -1;
            } else if (this.showsla > d.showsla) {
                return 1;
            } else {
                return 0;
            }
        } else {
            return -1;
        }
    }
}
