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

AuthMe / ConfigMe / 6161407230

12 Sep 2023 03:11PM UTC coverage: 98.153% (-0.4%) from 98.541%
6161407230

push

github

ljacqu
Add missing javadoc + constructors, nullability annotations, some tests...

534 of 548 branches covered (0.0%)

16 of 16 new or added lines in 6 files covered. (100.0%)

1488 of 1516 relevant lines covered (98.15%)

4.49 hits per line

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

0.0
/src/main/java/ch/jalu/configme/properties/types/EnumSetPropertyType.java
1
package ch.jalu.configme.properties.types;
2

3
import org.jetbrains.annotations.NotNull;
4

5
import java.util.EnumSet;
6
import java.util.stream.Collector;
7
import java.util.stream.Collectors;
8

9
/**
10
 * Property type that manages an enum set.
11
 *
12
 * @param <E> the enum type of the entries
13
 */
14
public class EnumSetPropertyType<E extends Enum<E>> extends CollectionPropertyType<E, EnumSet<E>> {
15

16
    /**
17
     * Constructor.
18
     *
19
     * @param enumClass the enum class the entries should have
20
     */
21
    public EnumSetPropertyType(@NotNull Class<E> enumClass) {
22
        this(EnumPropertyType.of(enumClass));
×
23
    }
×
24

25
    /**
26
     * Constructor.
27
     *
28
     * @param entryType enum type of the entries
29
     */
30
    public EnumSetPropertyType(@NotNull EnumPropertyType<E> entryType) {
31
        super(entryType);
×
32
    }
×
33

34
    @Override
35
    public @NotNull EnumPropertyType<E> getEntryType() {
36
        return (EnumPropertyType<E>) super.getEntryType();
×
37
    }
38

39
    public @NotNull Class<E> getEnumClass() {
40
        return getEntryType().getEnumClass();
×
41
    }
42

43
    @Override
44
    protected @NotNull Collector<E, ?, EnumSet<E>> resultCollector() {
45
        return Collectors.toCollection(() -> EnumSet.noneOf(getEnumClass()));
×
46
    }
47
}
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