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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
 * Copyright (C) 2016 huanghaibin_dev <huanghaibin_dev@163.com>
 * WebSite https://github.com/MiracleTimes-Dev
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.haibin.oldcalendarview;
 
 
import java.io.Serializable;
 
/**
 * 日历对象、
 */
@SuppressWarnings("all")
public class Calendar implements Serializable {
    private int year;
    private int month;
    private int week;
    private int day;
    private boolean isCurrentMonth;//是否是本月
    private boolean isCurrentDay;//是否是今天
    private String lunar;//农历
    private String scheme;//计划,可以用来标记当天是否有任务
    private boolean schemeCompleted;
    private int schemeColor;//各种自定义标记颜色、没有则选择默认颜色
    private int completedSchemeColor;
    private boolean highLightBackground;
    private int highLightColor;
 
    public int getYear() {
        return year;
    }
 
    public void setYear(int year) {
        this.year = year;
    }
 
    public int getMonth() {
        return month;
    }
 
    public void setMonth(int month) {
        this.month = month;
    }
 
    public int getWeek() {
        return week;
    }
 
    public void setWeek(int week) {
        this.week = week;
    }
 
    public int getDay() {
        return day;
    }
 
    public void setDay(int day) {
        this.day = day;
    }
 
    public boolean isCurrentMonth() {
        return isCurrentMonth;
    }
 
    public void setCurrentMonth(boolean currentMonth) {
        this.isCurrentMonth = currentMonth;
    }
 
    public boolean isCurrentDay() {
        return isCurrentDay;
    }
 
    public void setCurrentDay(boolean currentDay) {
        isCurrentDay = currentDay;
    }
 
 
    public String getLunar() {
        return lunar;
    }
 
    public void setLunar(String lunar) {
        this.lunar = lunar;
    }
 
    public String getScheme() {
        return scheme;
    }
 
    public void setScheme(String scheme) {
        this.scheme = scheme;
    }
 
    public boolean isSchemeCompleted() {
        return schemeCompleted;
    }
 
    public void setSchemeCompleted(boolean schemeCompleted) {
        this.schemeCompleted = schemeCompleted;
    }
 
    public int getSchemeColor() {
        return schemeColor;
    }
 
    public void setSchemeColor(int schemeColor) {
        this.schemeColor = schemeColor;
    }
 
    public int getCompletedSchemeColor() {
        return completedSchemeColor;
    }
 
    public void setCompletedSchemeColor(int completedSchemeColor) {
        this.completedSchemeColor = completedSchemeColor;
    }
 
    public int getHighLightColor() {
        return highLightColor;
    }
 
    public void setHighLightColor(int highLightColor) {
        this.highLightColor = highLightColor;
    }
 
    @Override
    public boolean equals(Object o) {
        if (o != null && o instanceof Calendar) {
            if (((Calendar) o).getYear() == year && ((Calendar) o).getMonth() == month && ((Calendar) o).getDay() == day)
                return true;
        }
        return super.equals(o);
    }
 
    @Override
    public String toString() {
        return year + "" + (month < 10 ? "0" + month : month) + "" + (day < 10 ? "0" + day : day);
    }
 
    public String getCurrentYearMonth() {
        return year + "年" + (month < 10 ? "0" + month : month)+"月";
    }
 
}