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

leeonky / test-charm-java / 338

05 Oct 2025 04:05PM UTC coverage: 74.667% (+0.06%) from 74.611%
338

push

circleci

leeonky
Some index mapping in list consistency

4 of 4 new or added lines in 2 files covered. (100.0%)

23 existing lines in 3 files now uncovered.

8627 of 11554 relevant lines covered (74.67%)

0.75 hits per line

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

92.86
/jfactory/src/main/java/com/github/leeonky/jfactory/Coordinate.java
1
package com.github.leeonky.jfactory;
2

3
import com.github.leeonky.util.BeanClass;
4

5
import java.util.ArrayList;
6
import java.util.List;
7
import java.util.stream.Collectors;
8

9
import static java.util.Collections.singletonList;
10

11
public class Coordinate {
12
    private final List<Index> indexes = new ArrayList<>();
1✔
13

14
    public Coordinate(List<Index> indexes) {
1✔
15
        this.indexes.addAll(indexes);
1✔
16
    }
1✔
17

18
    public Coordinate reverse() {
19
        return new Coordinate(indexes.stream().map(Index::reverse).collect(Collectors.toList()));
1✔
20
    }
21

22
    public List<Index> indexes() {
23
        return indexes;
1✔
24
    }
25

26
    public static D1 d1(Index index) {
27
        return new D1(singletonList(index));
1✔
28
    }
29

30
    public <C extends Coordinate> C convertTo(BeanClass<C> type) {
31
        return type.newInstance(indexes());
1✔
32
    }
33

34
    private static List<Index> require(List<Index> indexes, int size) {
35
        if (indexes.size() != size)
1✔
UNCOV
36
            throw new IllegalArgumentException("Coordinate size not match");
×
37
        return indexes;
1✔
38
    }
39

40
    public static class D1 extends Coordinate {
41
        public D1(List<Index> index) {
42
            super(require(index, 1));
1✔
43
        }
1✔
44

45
        public Index index() {
46
            return indexes().get(0);
1✔
47
        }
48
    }
49
}
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