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

knowledgepixels / nanodash / 17604775315

10 Sep 2025 06:06AM UTC coverage: 13.666% (-0.1%) from 13.801%
17604775315

push

github

tkuhn
Simplify MethodResultComponent

414 of 3902 branches covered (10.61%)

Branch coverage included in aggregate %.

1088 of 7089 relevant lines covered (15.35%)

0.68 hits per line

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

0.0
src/main/java/com/knowledgepixels/nanodash/component/MethodResultComponent.java
1
package com.knowledgepixels.nanodash.component;
2

3
import java.util.function.Supplier;
4

5
import org.apache.wicket.Component;
6

7
public abstract class MethodResultComponent<R> extends ResultComponent {
8

9
    private final transient Supplier<Boolean> readyFunction;
10
    private final transient Supplier<R> resultFunction;
11

12
    public MethodResultComponent(String id, Supplier<Boolean> readyFunction, Supplier<R> resultFunction) {
13
        super(id);
×
14
        setOutputMarkupId(true);
×
15
        this.readyFunction = readyFunction;
×
16
        this.resultFunction = resultFunction;
×
17
    }
×
18

19
    /**
20
     * {@inheritDoc}
21
     */
22
    @Override
23
    protected boolean isContentReady() {
24
        return readyFunction.get();
×
25
    }
26

27
    /**
28
     * {@inheritDoc}
29
     */
30
    @Override
31
    public Component getLazyLoadComponent(String markupId) {
32
        R result = resultFunction.get();
×
33
        return getResultComponent(markupId, result);
×
34
    }
35

36
    // TODO Use lambda instead of abstract method?
37
    public abstract Component getResultComponent(String markupId, R result);
38

39
}
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