1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.criteria.impl; |
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
|
|
| 52.6% |
Uncovered Elements: 9 (19) |
Complexity: 10 |
Complexity Density: 1.11 |
|
25 |
|
public class DurationFactory |
26 |
|
{ |
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
public static final Duration DAY = createDuration(0, 0, 0, 1); |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
public static final Duration WEEK = createDuration(0, 0, 1, 0); |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
public static final Duration MONTH = createDuration(0, 1, 0, 0); |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
public static final Duration YEAR = createDuration(1, 0, 0, 0); |
46 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
47 |
0 |
public DurationFactory()... |
48 |
|
{ |
49 |
|
} |
50 |
|
|
51 |
|
|
52 |
|
@see |
53 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
54 |
20 |
public static Duration createDuration(int years, int months, int weeks, int days)... |
55 |
|
{ |
56 |
20 |
return new Duration(years, months, weeks, days); |
57 |
|
} |
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
@param |
63 |
|
@return |
64 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
3 |
public static Duration createDays(int days)... |
66 |
|
{ |
67 |
3 |
return createDuration(0, 0, 0, days); |
68 |
|
} |
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
@param |
74 |
|
@return |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
3 |
public static Duration createWeeks(int weeks)... |
77 |
|
{ |
78 |
3 |
return createDuration(0, 0, weeks, 0); |
79 |
|
} |
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
@param |
85 |
|
@return |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
3 |
public static Duration createMonths(int months)... |
88 |
|
{ |
89 |
3 |
return createDuration(0, months, 0, 0); |
90 |
|
} |
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
@param |
96 |
|
@return |
97 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
3 |
public static Duration createYears(int years)... |
99 |
|
{ |
100 |
3 |
return createDuration(years, 0, 0, 0); |
101 |
|
} |
102 |
|
|
103 |
|
|
104 |
|
@link |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0 |
public static Duration getDAY()... |
107 |
|
{ |
108 |
0 |
return DAY; |
109 |
|
} |
110 |
|
|
111 |
|
|
112 |
|
@link |
113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
0 |
public static Duration getWEEK()... |
115 |
|
{ |
116 |
0 |
return WEEK; |
117 |
|
} |
118 |
|
|
119 |
|
|
120 |
|
@link |
121 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
122 |
0 |
public static Duration getMONTH()... |
123 |
|
{ |
124 |
0 |
return MONTH; |
125 |
|
} |
126 |
|
|
127 |
|
|
128 |
|
@link |
129 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
0 |
public static Duration getYEAR()... |
131 |
|
{ |
132 |
0 |
return YEAR; |
133 |
|
} |
134 |
|
} |