Class IngredientCollectionHelpers
java.lang.Object
org.cyclops.cyclopscore.ingredient.collection.IngredientCollectionHelpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,M> IIngredientCollapsedCollectionMutable <T, M> createCollapsedCollection(IngredientComponent<T, M> ingredientComponent) Create a new collapsed collection for the given ingredient component.static <T,M, V> IIngredientMapMutable <T, M, V> createCollapsedMap(IngredientComponent<T, M> ingredientComponent) Create a new collapsed map for the given ingredient component.
-
Constructor Details
-
IngredientCollectionHelpers
public IngredientCollectionHelpers()
-
-
Method Details
-
createCollapsedCollection
public static <T,M> IIngredientCollapsedCollectionMutable<T,M> createCollapsedCollection(IngredientComponent<T, M> ingredientComponent) Create a new collapsed collection for the given ingredient component. This collection will not be able to store negative quantities.- Type Parameters:
T- The instance type.M- The matching condition parameter.- Parameters:
ingredientComponent- An ingredient component.- Returns:
- A mutable collapsed ingredient collection.
-
createCollapsedMap
public static <T,M, IIngredientMapMutable<T,V> M, createCollapsedMapV> (IngredientComponent<T, M> ingredientComponent) Create a new collapsed map for the given ingredient component.- Type Parameters:
T- The instance type.M- The matching condition parameter.V- The map's value.- Parameters:
ingredientComponent- An ingredient component.- Returns:
- A mutable collapsed ingredient map.
-