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

CyclopsMC / IntegratedDynamics / 20210191346

14 Dec 2025 03:32PM UTC coverage: 19.514% (-33.5%) from 53.061%
20210191346

push

github

rubensworks
Remove deprecations

663 of 8728 branches covered (7.6%)

Branch coverage included in aggregate %.

6786 of 29445 relevant lines covered (23.05%)

1.09 hits per line

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

0.0
/src/main/java/org/cyclops/integrateddynamics/core/network/IngredientChannelIndexed.java
1
package org.cyclops.integrateddynamics.core.network;
2

3
import org.cyclops.integrateddynamics.api.ingredient.IIngredientPositionsIndex;
4
import org.cyclops.integrateddynamics.api.part.PartPos;
5

6
import javax.annotation.Nonnull;
7
import java.util.Iterator;
8

9
/**
10
 * An ingredient channel that exploits the network's index.
11
 *
12
 * @param <T> The instance type.
13
 * @param <M> The matching condition parameter.
14
 */
15
public class IngredientChannelIndexed<T, M> extends IngredientChannelAdapter<T, M> {
16

17
    private final IIngredientPositionsIndex<T, M> index;
18

19
    public IngredientChannelIndexed(PositionedAddonsNetworkIngredients<T, M> network, int channel,
20
                                    IIngredientPositionsIndex<T, M> index) {
21
        super(network, channel);
×
22
        this.index = index;
×
23
    }
×
24

25
    public IIngredientPositionsIndex<T, M> getIndex() {
26
        return index;
×
27
    }
28

29
    @Override
30
    protected Iterator<PartPos> getNonFullPositions() {
31
        this.scheduleObservation();
×
32
        return this.getNetwork().getPositions(getChannel()).iterator();
×
33
    }
34

35
    @Override
36
    protected Iterator<PartPos> getAllPositions() {
37
        this.scheduleObservation();
×
38
        return this.getNetwork().getPositions(getChannel()).iterator();
×
39
    }
40

41
    @Override
42
    protected Iterator<PartPos> getNonEmptyPositions() {
43
        this.scheduleObservation();
×
44
        return this.index.getNonEmptyPositions();
×
45
    }
46

47
    @Override
48
    protected Iterator<PartPos> getMatchingPositions(@Nonnull T prototype, M matchFlags) {
49
        this.scheduleObservation();
×
50
        return this.index.getPositions(prototype, matchFlags);
×
51
    }
52

53
    @Override
54
    public Iterator<T> iterator() {
55
        this.scheduleObservation();
×
56
        return this.index.iterator();
×
57
    }
58

59
    @Override
60
    public Iterator<T> iterator(@Nonnull T prototype, M matchFlags) {
61
        this.scheduleObservation();
×
62
        return this.index.iterator(prototype, matchFlags);
×
63
    }
64

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