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

AuthMe / ConfigMe / 6013592978

29 Aug 2023 02:22PM UTC coverage: 95.279%. First build
6013592978

push

github

ljacqu
New property builder: current working changes

526 of 544 branches covered (0.0%)

33 of 33 new or added lines in 5 files covered. (100.0%)

1453 of 1525 relevant lines covered (95.28%)

4.36 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/builder/InlineArrayPropertyBuilder.java
1
package ch.jalu.configme.properties.builder;
2

3
import ch.jalu.configme.properties.InlineArrayProperty;
4
import ch.jalu.configme.properties.Property;
5
import ch.jalu.configme.properties.inlinearray.InlineArrayConverter;
6
import org.jetbrains.annotations.NotNull;
7

8
import java.util.function.BiFunction;
9

10
public class InlineArrayPropertyBuilder<E, P extends Property<E[]>> {
11

12
    private String path;
13
    private E[] defaultValue;
14
    private final BiFunction<String, E[], P> createPropertyFunction;
15

16

17
    public InlineArrayPropertyBuilder(@NotNull BiFunction<String, E[], P> createPropertyFunction) {
×
18
        this.createPropertyFunction = createPropertyFunction;
×
19
    }
×
20

21
    public static <E> @NotNull InlineArrayPropertyBuilder<E, InlineArrayProperty<E>> inlineArrayBuilder(
22
                                                                    @NotNull InlineArrayConverter<E> arrayElementType) {
23
        return new InlineArrayPropertyBuilder<>(
×
24
            (path, defVal) -> new InlineArrayProperty<>(path, defVal, arrayElementType));
×
25
    }
26

27
    public @NotNull InlineArrayPropertyBuilder<E, P> path(@NotNull String path) {
28
        this.path = path;
×
29
        return this;
×
30
    }
31

32
    @SafeVarargs
33
    public final @NotNull InlineArrayPropertyBuilder<E, P> defaultValue(@NotNull E @NotNull ... defaultValue) {
34
        this.defaultValue = defaultValue;
×
35
        return this;
×
36
    }
37

38
    public @NotNull P build() {
39
        return createPropertyFunction.apply(path, defaultValue);
×
40
    }
41
}
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

© 2025 Coveralls, Inc