• 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/ingredient/ExtendedIngredientsList.java
1
package org.cyclops.integrateddynamics.core.ingredient;
2

3
import com.google.common.collect.Sets;
4
import org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients;
5
import org.cyclops.commoncapabilities.api.ingredient.IngredientComponent;
6

7
import java.util.List;
8
import java.util.Set;
9

10
/**
11
 * A lazy extension for ingredients for a list of instances.
12
 * @param <T> The instance type.
13
 * @param <M> The matching condition parameter, may be Void. Instances MUST properly implement the equals method.
14
 * @author rubensworks
15
 */
16
public class ExtendedIngredientsList<T, M> extends WrappedIngredients {
17

18
    private final IngredientComponent<T, M> component;
19
    private final List<T> instances;
20

21
    public ExtendedIngredientsList(IMixedIngredients base, IngredientComponent<T, M> component, List<T> instances) {
22
        super(base);
×
23
        this.component = component;
×
24
        this.instances = instances;
×
25
    }
×
26

27
    protected boolean forComponent(IngredientComponent<?, ?> component) {
28
        return component == this.component;
×
29
    }
30

31
    @Override
32
    public Set<IngredientComponent<?, ?>> getComponents() {
33
        Set<IngredientComponent<?, ?>> components = Sets.newIdentityHashSet();
×
34
        components.addAll(super.getComponents());
×
35
        components.add(component);
×
36
        return components;
×
37
    }
38

39
    @Override
40
    public <T2> List<T2> getInstances(IngredientComponent<T2, ?> ingredientComponent) {
41
        List<T2> superList = super.getInstances(ingredientComponent);
×
42
        return forComponent(ingredientComponent) ? (List<T2>) this.instances : superList;
×
43
    }
44
}
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