Class CraftingJobIndexDefault
java.lang.Object
org.cyclops.integratedcrafting.core.CraftingJobIndexDefault
- All Implemented Interfaces:
ICraftingJobIndex,ICraftingJobIndexModifiable
A default implementation of
ICraftingJobIndex and ICraftingJobIndexModifiable.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCraftingJob(CraftingJob craftingJob) Add the given crafting job to this index.protected <T,M> void addCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T, M, Collection<CraftingJob>> index, CraftingJob craftingJob) getCraftingJob(int craftingJobId) Get the crafting job with the given id.<T,M> Iterator<CraftingJob> getCraftingJobs(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> outputType, T output, M matchCondition) Find crafting jobs with the given output.protected <T,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T, M, Collection<CraftingJob>> initializeIndex(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> recipeComponent) voidremoveCraftingJob(CraftingJob craftingJob) Remove the given crafting job from this index.protected <T,M> void removeCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T, M, Collection<CraftingJob>> index, CraftingJob craftingJob)
-
Constructor Details
-
CraftingJobIndexDefault
public CraftingJobIndexDefault()
-
-
Method Details
-
getCraftingJobs
- Specified by:
getCraftingJobsin interfaceICraftingJobIndex- Returns:
- All crafting jobs that are available.
-
getCraftingJobs
public <T,M> Iterator<CraftingJob> getCraftingJobs(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> outputType, T output, M matchCondition) Description copied from interface:ICraftingJobIndexFind crafting jobs with the given output.- Specified by:
getCraftingJobsin interfaceICraftingJobIndex- Type Parameters:
T- The instance type.M- The matching condition parameter, may be Void.- Parameters:
outputType- The recipe component type.output- An output ingredient instance.matchCondition- A condition under which the matching should be done.- Returns:
- An iterator of the crafting jobs that have the given output.
-
getCraftingJob
Description copied from interface:ICraftingJobIndexGet the crafting job with the given id.- Specified by:
getCraftingJobin interfaceICraftingJobIndex- Parameters:
craftingJobId- A crafting job id.- Returns:
- A crafting job or null.
-
initializeIndex
@Nullable protected <T,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M, initializeIndexCollection<CraftingJob>> (org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> recipeComponent) -
addCraftingJob
Description copied from interface:ICraftingJobIndexModifiableAdd the given crafting job to this index.- Specified by:
addCraftingJobin interfaceICraftingJobIndexModifiable- Parameters:
craftingJob- A crafting job.
-
addCraftingJobForComponent
protected <T,M> void addCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T, M, Collection<CraftingJob>> index, CraftingJob craftingJob) -
removeCraftingJob
Description copied from interface:ICraftingJobIndexModifiableRemove the given crafting job from this index.- Specified by:
removeCraftingJobin interfaceICraftingJobIndexModifiable- Parameters:
craftingJob- A crafting job.
-
removeCraftingJobForComponent
protected <T,M> void removeCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T, M, Collection<CraftingJob>> index, CraftingJob craftingJob)
-