• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AuthMe / ConfigMe / 6014622287

29 Aug 2023 03:52PM UTC coverage: 93.592% (-1.7%) from 95.279%
6014622287

push

github

ljacqu
Draft: collection property types (2)

522 of 544 branches covered (0.0%)

37 of 37 new or added lines in 3 files covered. (100.0%)

1446 of 1545 relevant lines covered (93.59%)

4.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/main/java/ch/jalu/configme/properties/ListProperty.java
1
package ch.jalu.configme.properties;
2

3
import ch.jalu.configme.properties.types.ListPropertyType;
4
import ch.jalu.configme.properties.types.PropertyType;
5
import org.jetbrains.annotations.NotNull;
6

7
import java.util.Arrays;
8
import java.util.Collections;
9
import java.util.List;
10

11
/**
12
 * List property of a configurable type. The lists are immutable. TODO "immutable" comment not really true
13
 *
14
 * @param <E> the entry type
15
 */
16
public class ListProperty<E> extends TypeBasedProperty<List<E>> {
17

18
    /**
19
     * Constructor.
20
     *
21
     * @param path the path of the property
22
     * @param type the property type
23
     * @param defaultValue the entries in the list of the default value
24
     */
25
    @SafeVarargs
26
    public ListProperty(@NotNull String path, @NotNull PropertyType<E> type, @NotNull E @NotNull ... defaultValue) {
27
        this(path, type, Arrays.asList(defaultValue));
6✔
28
    }
1✔
29

30
    /**
31
     * Constructor.
32
     *
33
     * @param path the path of the property
34
     * @param type the entry type
35
     * @param defaultValue the default value of the property
36
     */
37
    public ListProperty(@NotNull String path, @NotNull PropertyType<E> type, @NotNull List<E> defaultValue) {
38
        super(path, Collections.unmodifiableList(defaultValue), new ListPropertyType<>(type));
9✔
39
    }
1✔
40

41
    /**
42
     * Constructor.
43
     *
44
     * @param path the path of the property
45
     * @param type the entry type
46
     * @param defaultValue the default value of the property
47
     */
48
    public ListProperty(@NotNull String path, @NotNull ListPropertyType<E> type, @NotNull List<E> defaultValue) {
49
        super(path, Collections.unmodifiableList(defaultValue), type);
×
50
    }
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc