From 5bf10e476366e9aff291d55c050a324734bae911 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 27 Aug 2020 19:47:47 +0800 Subject: Some Nullable and NotNull annotations Signed-off-by: shedaniel --- .../src/main/java/me/shedaniel/rei/api/RecipeDisplay.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java') diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java index a22dea125..44e655da4 100644 --- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java +++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java @@ -26,6 +26,7 @@ package me.shedaniel.rei.api; import me.shedaniel.rei.utils.CollectionUtils; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.List; @@ -36,6 +37,7 @@ public interface RecipeDisplay { /** * @return a list of inputs */ + @NotNull List> getInputEntries(); /** @@ -43,6 +45,7 @@ public interface RecipeDisplay { */ @Deprecated @ApiStatus.ScheduledForRemoval + @NotNull default List getOutputEntries() { return Collections.emptyList(); } @@ -50,6 +53,7 @@ public interface RecipeDisplay { /** * @return a list of outputs */ + @NotNull default List> getResultingEntries() { return CollectionUtils.map(getOutputEntries(), Collections::singletonList); } @@ -59,6 +63,7 @@ public interface RecipeDisplay { * * @return the list of required items */ + @NotNull default List> getRequiredEntries() { return Collections.emptyList(); } @@ -68,6 +73,7 @@ public interface RecipeDisplay { * * @return the identifier of the category */ + @NotNull ResourceLocation getRecipeCategory(); /** @@ -75,6 +81,7 @@ public interface RecipeDisplay { * * @return the recipe location */ + @NotNull default Optional getRecipeLocation() { return Optional.empty(); } -- cgit