1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.lesscss.internal.colortheme; |
21 |
|
|
22 |
|
import org.xwiki.model.reference.DocumentReference; |
23 |
|
import org.xwiki.model.reference.EntityReferenceSerializer; |
24 |
|
|
25 |
|
|
26 |
|
@link |
27 |
|
|
28 |
|
|
29 |
|
@since |
30 |
|
@version |
31 |
|
|
|
|
| 75% |
Uncovered Elements: 4 (16) |
Complexity: 6 |
Complexity Density: 0.67 |
|
32 |
|
public class DocumentColorThemeReference implements ColorThemeReference |
33 |
|
{ |
34 |
|
private DocumentReference colorThemeDocument; |
35 |
|
|
36 |
|
private EntityReferenceSerializer<String> entityReferenceSerializer; |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
@param |
41 |
|
@param |
42 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
43 |
36 |
public DocumentColorThemeReference(DocumentReference colorThemeDocument, ... |
44 |
|
EntityReferenceSerializer<String> entityReferenceSerializer) |
45 |
|
{ |
46 |
36 |
this.colorThemeDocument = colorThemeDocument; |
47 |
36 |
this.entityReferenceSerializer = entityReferenceSerializer; |
48 |
|
} |
49 |
|
|
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
50 |
2 |
@Override... |
51 |
|
public boolean equals(Object o) { |
52 |
2 |
if (o instanceof DocumentColorThemeReference) { |
53 |
2 |
DocumentColorThemeReference documentSkinReference = (DocumentColorThemeReference) o; |
54 |
2 |
return colorThemeDocument.equals(documentSkinReference.colorThemeDocument); |
55 |
|
} |
56 |
0 |
return false; |
57 |
|
} |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
20 |
@Override... |
60 |
|
public int hashCode() { |
61 |
20 |
return colorThemeDocument.hashCode(); |
62 |
|
} |
63 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
52 |
@Override... |
65 |
|
public String serialize() |
66 |
|
{ |
67 |
52 |
return String.format("ColorThemeDocument[%s]", entityReferenceSerializer.serialize(colorThemeDocument)); |
68 |
|
} |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0 |
@Override... |
71 |
|
public String toString() |
72 |
|
{ |
73 |
0 |
return serialize(); |
74 |
|
} |
75 |
|
} |