From 2077ebf086543587c4fc7ca9b125809609f749b9 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 3 Jan 2020 23:20:31 +0800 Subject: Compact the design and add cooking xp details --- src/main/java/me/shedaniel/rei/utils/CollectionUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/me/shedaniel/rei/utils/CollectionUtils.java') diff --git a/src/main/java/me/shedaniel/rei/utils/CollectionUtils.java b/src/main/java/me/shedaniel/rei/utils/CollectionUtils.java index 4c2dd7a04..b23b802c7 100644 --- a/src/main/java/me/shedaniel/rei/utils/CollectionUtils.java +++ b/src/main/java/me/shedaniel/rei/utils/CollectionUtils.java @@ -46,6 +46,14 @@ public class CollectionUtils { return false; } + public static EntryStack firstOrNullEqualsAll(List list, EntryStack stack) { + for (EntryStack t : list) { + if (t.equalsAll(stack)) + return t; + } + return null; + } + public static List filter(List list, Predicate predicate) { List l = new LinkedList<>(); for (T t : list) { -- cgit