zoukankan      html  css  js  c++  java
  • WebSiteInfo

    package com.bjsxt.spark.others.pvuv;

    import java.io.Serializable;

    public class WebSiteInfo implements Serializable, Comparable<WebSiteInfo>{

    /**
    *
    */
    private static final long serialVersionUID = 1L;
    private String website;
    private String area;
    private Integer total;

    public WebSiteInfo(String website, String area, Integer total) {
    super();
    this.website = website;
    this.area = area;
    this.total = total;
    }

    public String getWebsite() {
    return website;
    }

    public void setWebsite(String website) {
    this.website = website;
    }

    public String getArea() {
    return area;
    }

    public void setArea(String area) {
    this.area = area;
    }

    public Integer getTotal() {
    return total;
    }

    public void setTotal(Integer total) {
    this.total = total;
    }

    @Override
    public int compareTo(WebSiteInfo webSiteInfo) {
    if(webSiteInfo.website.hashCode()-this.website.hashCode()==0){
    //比第二和第三位
    if(webSiteInfo.area.hashCode()-this.area.hashCode()!=0){
    //比第三位
    if(webSiteInfo.total-this.total!=0){
    return webSiteInfo.total-this.total;
    }
    }
    return webSiteInfo.area.hashCode()-this.area.hashCode();
    }
    return webSiteInfo.website.hashCode()-this.website.hashCode();
    }

    }

  • 相关阅读:
    提高电脑运行效率
    Android_实验小心得_持续补充中......
    LNMP环境搭建wordpress
    php安装
    mysql、MariaDB(yum)
    Nginx配置(yum)
    httpd配置(yum)
    jumpserver环境搭建
    命令
    vsftpd
  • 原文地址:https://www.cnblogs.com/huiandong/p/9194711.html
Copyright © 2011-2022 走看看