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

leeonky / test-charm-java / 356

08 Oct 2025 01:39PM UTC coverage: 75.141% (+5.1%) from 70.03%
356

push

circleci

leeonky
Update version

8817 of 11734 relevant lines covered (75.14%)

0.75 hits per line

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

90.0
/jfactory/src/main/java/com/github/leeonky/jfactory/Index.java
1
package com.github.leeonky.jfactory;
2

3
public class Index {
4
    private final int index, size;
5

6
    public Index(int size, int index) {
1✔
7
        this.index = index;
1✔
8
        this.size = size;
1✔
9
    }
1✔
10

11
    public Index reverse() {
12
        return new Index(size, size - 1 - index);
1✔
13
    }
14

15
    public int index() {
16
        return index;
1✔
17
    }
18

19
    public Index shift(int i) {
20
        return new Index(size, (index + i) % size);
1✔
21
    }
22

23
    public Index sample(int period, int offset) {
24
        return index % period == offset ? new Index(size / period, index / period) : null;
1✔
25
    }
26

27
    public Index interpolate(int period, int offset) {
28
        return new Index(size * period, index * period + offset);
1✔
29
    }
30

31
    @Override
32
    public String toString() {
33
        return String.format("%d(%d)", index, size);
×
34
    }
35
}
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