aswi2020vldc-gitlab/src/main/java/vldc/aswi/model/table/TableColumn.java @ ba8b306a
1 |
package vldc.aswi.model.table; |
---|---|
2 |
|
3 |
import java.util.ArrayList; |
4 |
import java.util.List; |
5 |
|
6 |
/**
|
7 |
* Class representing one table column.
|
8 |
*/
|
9 |
public class TableColumn { |
10 |
|
11 |
/** Name of table column. */
|
12 |
private String name; |
13 |
|
14 |
/** List of values in current column. */
|
15 |
private List<String> values; |
16 |
|
17 |
/**
|
18 |
* Constructor.
|
19 |
* @param name - Name of table column.
|
20 |
*/
|
21 |
public TableColumn(String name) { |
22 |
this.name = name; |
23 |
values = new ArrayList<>(); |
24 |
}
|
25 |
|
26 |
/**
|
27 |
* Add new value into list of values.
|
28 |
* @param value - New value.
|
29 |
*/
|
30 |
public void addValue(String value) { |
31 |
values.add(value); |
32 |
}
|
33 |
|
34 |
/**
|
35 |
* Get name of table column.
|
36 |
* @return Name of table column.
|
37 |
*/
|
38 |
public String getName() { |
39 |
return name; |
40 |
}
|
41 |
|
42 |
/**
|
43 |
* Get all values in current table column.
|
44 |
* @return List of all values.
|
45 |
*/
|
46 |
public List<String> getValues() { |
47 |
return values; |
48 |
}
|
49 |
}
|