BrightSide Workbench Full Report + Source Code
CalendarMode.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2012 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
package
org.turro.calendar;
20
25
public
enum
CalendarMode
{
26
27
DAY_MODE
(
"day"
, 1,
"default"
),
28
WEEK_MODE
(
"week"
, 7,
"default"
),
29
WORKDAYS_MODE
(
"workday"
, 5,
"default"
),
30
MONTH_MODE
(
"month"
, 0,
"month"
);
31
32
private
int
days;
33
private
String key,
mold
;
34
35
private
CalendarMode
(String key,
int
days, String mold) {
36
this.key = key;
37
this.days = days;
38
this.mold = mold;
39
}
40
41
public
String
getKey
() {
42
return
key;
43
}
44
45
public
int
getDays
() {
46
return
days;
47
}
48
49
public
String
getMold
() {
50
return
mold;
51
}
52
53
public
static
CalendarMode
getByKey
(String key) {
54
for
(
CalendarMode
cm :
CalendarMode
.values()) {
55
if
(key.equals(cm.getKey()))
return
cm;
56
}
57
return
null
;
58
}
59
}
org.turro.calendar.CalendarMode
Definition:
CalendarMode.java:25
org.turro.calendar.CalendarMode.DAY_MODE
DAY_MODE
Definition:
CalendarMode.java:27
org.turro.calendar.CalendarMode.getMold
String getMold()
Definition:
CalendarMode.java:49
org.turro.calendar.CalendarMode.getDays
int getDays()
Definition:
CalendarMode.java:45
org.turro.calendar.CalendarMode.MONTH_MODE
MONTH_MODE
Definition:
CalendarMode.java:30
org.turro.calendar.CalendarMode.mold
String mold
Definition:
CalendarMode.java:33
org.turro.calendar.CalendarMode.getByKey
static CalendarMode getByKey(String key)
Definition:
CalendarMode.java:53
org.turro.calendar.CalendarMode.WEEK_MODE
WEEK_MODE
Definition:
CalendarMode.java:28
org.turro.calendar.CalendarMode.WORKDAYS_MODE
WORKDAYS_MODE
Definition:
CalendarMode.java:29
org.turro.calendar.CalendarMode.getKey
String getKey()
Definition:
CalendarMode.java:41
TurroProjects
Public
BrightSide
elephant-calendar
src
main
java
org
turro
calendar
CalendarMode.java
Generated on Tue Mar 12 2024 07:01:18 for BrightSide by
1.9.1