aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/utils/CollectionUtils.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-03 23:20:31 +0800
committershedaniel <daniel@shedaniel.me>2020-01-03 23:20:31 +0800
commit2077ebf086543587c4fc7ca9b125809609f749b9 (patch)
tree2d8bbbb075809c4dac0a701de238dfaf4d6b092a /src/main/java/me/shedaniel/rei/utils/CollectionUtils.java
parent3e5c16747b3403cc4cc725676c13ba50f04d3e9b (diff)
downloadRoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.tar.gz
RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.tar.bz2
RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.zip
Compact the design and add cooking xp details
Diffstat (limited to 'src/main/java/me/shedaniel/rei/utils/CollectionUtils.java')
-rw-r--r--src/main/java/me/shedaniel/rei/utils/CollectionUtils.java8
1 files changed, 8 insertions, 0 deletions
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<EntryStack> list, EntryStack stack) {
+ for (EntryStack t : list) {
+ if (t.equalsAll(stack))
+ return t;
+ }
+ return null;
+ }
+
public static <T> List<T> filter(List<T> list, Predicate<T> predicate) {
List<T> l = new LinkedList<>();
for (T t : list) {