package gregtech.api.recipe.metadata; import java.util.Map; import java.util.Set; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; import org.jetbrains.annotations.Contract; import gregtech.api.recipe.RecipeMetadataKey; import gregtech.api.util.MethodsReturnNonnullByDefault; /** * Stores set of metadata for the recipe with key {@link RecipeMetadataKey}. More explicit way to store various info * on recipe than special value or special object. Type of the metadata can be anything. */ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public interface IRecipeMetadataStorage { void store(RecipeMetadataKey key, @Nullable T value); @Nullable T getMetadata(RecipeMetadataKey key); @Contract("_, !null -> !null") @Nullable T getMetadataOrDefault(RecipeMetadataKey key, @Nullable T defaultValue); Set, Object>> getEntries(); IRecipeMetadataStorage copy(); }