1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package safeluck.drive.evaluation.bean;
 
import com.anyun.exam.lib.MyLog;
 
import safeluck.drive.evaluation.util.Utils;
 
/**
 * MyApplication2
 * Created by lzw on 2019/3/19. 14:17:11
 * 邮箱:632393724@qq.com
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class ScoreBean implements Comparable<ScoreBean>{
    /**扣分分数*/
    private float mScore;
    /**扣分项目*/
    private String mItem;
    /**扣分原因*/
    private String reason;
 
    private long mUtc;
 
 
    public ScoreBean(float mScore, String mItem, String reason) {
        this.mScore = mScore;
        this.mItem = mItem;
        this.reason = reason;
    }
    public ScoreBean(float mScore, String mItem, String reason,String utc) {
        this.mScore = mScore;
        this.mItem = mItem;
        this.reason = reason;
        if (Utils.isDigital(utc)){
            MyLog.i("utc时间不是纯数字");
        }else{
 
 
            mUtc = Utils.dateToLongSec(utc);
        }
    }
 
    public long getUtc() {
        return mUtc;
    }
 
 
 
    public float getScore() {
        return mScore;
    }
 
    public void setScore(float mScore) {
        this.mScore = mScore;
    }
 
    public String getItem() {
        return mItem;
    }
 
    public void setItem(String mItem) {
        this.mItem = mItem;
    }
 
    public String getReason() {
        return reason;
    }
 
    public void setReason(String reason) {
        this.reason = reason;
    }
 
 
    @Override
    public int compareTo(ScoreBean o) {
       if (this.mUtc>o.getUtc()){
           return -1;
       }else if (this.mUtc==o.getUtc()){
           return 0;
       }else{
           return 1;
       }
    }
}