Class DefaultIngredientComponentStorageHandler
java.lang.Object
org.cyclops.commoncapabilities.api.ingredient.storage.DefaultIngredientComponentStorageHandler
- All Implemented Interfaces:
 IIngredientComponentStorageHandler
public class DefaultIngredientComponentStorageHandler
extends Object
implements IIngredientComponentStorageHandler
Default implementation of 
IIngredientComponentStorageHandler.- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescription<T,M> IIngredientComponentStorage <T, M> getStorage(IngredientComponent<T, M> ingredientComponent) Get the storage for the given ingredient component,<T,M> void setStorage(IngredientComponent<T, M> ingredientComponent, IIngredientComponentStorage<T, M> storage) Set the storage for the given ingredient component. 
- 
Constructor Details
- 
DefaultIngredientComponentStorageHandler
public DefaultIngredientComponentStorageHandler() 
 - 
 - 
Method Details
- 
getComponents
- Specified by:
 getComponentsin interfaceIIngredientComponentStorageHandler- Returns:
 - The ingredient component types this handler holds.
 
 - 
getStorage
@Nullable public <T,M> IIngredientComponentStorage<T,M> getStorage(IngredientComponent<T, M> ingredientComponent) Description copied from interface:IIngredientComponentStorageHandlerGet the storage for the given ingredient component,- Specified by:
 getStoragein interfaceIIngredientComponentStorageHandler- Type Parameters:
 T- The instance type.M- The matching condition parameter, may be Void. Instances MUST properly implement the equals method.- Parameters:
 ingredientComponent- The ingredient component.- Returns:
 - The ingredient component storage, or null if it is not available.
 
 - 
setStorage
public <T,M> void setStorage(IngredientComponent<T, M> ingredientComponent, @Nullable IIngredientComponentStorage<T, M> storage) Set the storage for the given ingredient component.- Type Parameters:
 T- The instance type.M- The matching condition parameter, may be Void. Instances MUST properly implement the equals method.- Parameters:
 ingredientComponent- The ingredient component.storage- The ingredient component storage, or null if it should be removed.
 
 -