1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.esigate.util;
16
17 import java.util.Arrays;
18 import java.util.Collection;
19 import java.util.Collections;
20 import java.util.Properties;
21
22
23
24
25
26
27 public class ParameterCollection extends Parameter<Collection<String>> {
28
29 public ParameterCollection(String name) {
30 super(name);
31 }
32
33 public ParameterCollection(String name, String... defaultValue) {
34 super(name, Arrays.asList(defaultValue));
35 }
36
37 @Override
38 public Collection<String> getValue(Properties properties) {
39
40 Collection<String> defaultValue = getDefaultValue();
41 if (defaultValue == null) {
42 defaultValue = Collections.emptyList();
43 }
44 return PropertiesUtil.getPropertyValue(properties, getName(), defaultValue);
45
46 }
47 }