zoukankan      html  css  js  c++  java
  • 类 排序 定义比较

    public class StationSongBean implements Comparable<StationSongBean>{
        private int song_id;
        private String song_name;
        private String singer_name;
        private String user_nickname;
        private boolean is_support;  //是否已支持过
        private int amount_support;
    
        //取值函数
        public void setSong_id(int song_id) {
            this.song_id = song_id;
        }
        public String getUser_nickname() {
            return user_nickname;
        }
        public String getSongName() {
            return song_name;
        }
        public String getSingerName() {
            return singer_name;
        }
        public int getAmount_support() {
            return amount_support;
        }
        public boolean getIs_support() {
            return is_support;
        }
    
        //赋值函数
        public int getSong_id() {
            return song_id;
        }
        public void setUser_nickname(String user_nickname) {
            this.user_nickname = user_nickname;
        }
        public void setSongName(String song_name) {
            this.song_name = song_name;
        }
        public void setSingerName(String singer_name) {
            this.singer_name = singer_name;
        }
        public void setAmount_support(int amount_support) {
            this.amount_support = amount_support;
        }
        public void setIs_support(boolean is_support) {
            this.is_support = is_support;
        }
    
        @Override
        public int compareTo(@NonNull StationSongBean stationSongBean) {
            return stationSongBean.getAmount_support()-this.amount_support;
        }
    }
  • 相关阅读:
    linux根目录空间不足
    兴趣点 / 关键点( Interest point/Keypoint )
    opencv批量修改图片尺寸
    Excel批量修改文件
    xm数据写入
    opencv矩阵操作
    SVM参数解析
    Mat取行或列
    clone()与image和 cloneTo()
    最大连通域(指针)
  • 原文地址:https://www.cnblogs.com/zhaozilongcjiajia/p/11692223.html
Copyright © 2011-2022 走看看