Coverage Summary for Class: Color (it.polimi.ingsw.view.model)
Class | Class, % | Method, % | Line, % |
---|---|---|---|
Color | 100% (1/ 1) | 100% (3/ 3) | 100% (7/ 7) |
1 package it.polimi.ingsw.view.model;
2
3 import java.util.ArrayList;
4 import java.util.Arrays;
5
6 import java.util.List;
7
8 /**
9 * Worker Color Data Structure
10 */
11 public class Color implements RawObj {
12 /**
13 * Color Value
14 */
15 private final String value;
16
17 /**
18 * Color Constructor
19 *
20 * @param color color value
21 */
22 public Color(String color) {
23 if (color == null)
24 throw new NullPointerException();
25 this.value = color;
26 }
27
28 @Override
29 public List<String> getRawData() {
30 return new ArrayList<>(Arrays.asList("Color: " + value));
31 }
32
33 /**
34 * Get color value
35 *
36 * @return color value
37 */
38 public String getValue() {
39 return value;
40 }
41 }