public class RecipeIndexDefault extends java.lang.Object implements IRecipeIndexModifiable
IRecipeIndex and IRecipeIndexModifiable.| Constructor and Description |
|---|
RecipeIndexDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecipe(org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe)
Add the given recipe to this index.
|
protected <T,M> void |
addRecipeForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> index,
org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe) |
java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> |
getRecipes() |
<T,M> java.util.Iterator<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> |
getRecipes(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> outputType,
T output,
M matchCondition)
Find recipes with the given output.
|
protected <T,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> |
initializeIndex(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> recipeComponent) |
void |
removeRecipe(org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe)
Remove the given recipe from this index.
|
protected <T,M> void |
removeRecipeForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> index,
org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe) |
public java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> getRecipes()
getRecipes in interface IRecipeIndexpublic <T,M> java.util.Iterator<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> getRecipes(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> outputType,
T output,
M matchCondition)
IRecipeIndexgetRecipes in interface IRecipeIndexT - The instance type.M - The matching condition parameter, may be Void.outputType - The recipe component type.output - An output ingredient instance.matchCondition - A condition under which the matching should be done.@Nullable protected <T,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> initializeIndex(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> recipeComponent)
public void addRecipe(org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe)
IRecipeIndexModifiableaddRecipe in interface IRecipeIndexModifiableprioritizedRecipe - A recipe.protected <T,M> void addRecipeForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> index,
org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe)
public void removeRecipe(org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe)
IRecipeIndexModifiableremoveRecipe in interface IRecipeIndexModifiableprioritizedRecipe - A recipe.protected <T,M> void removeRecipeForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Set<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> index,
org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition prioritizedRecipe)