diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-01-03 23:20:31 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-01-03 23:20:31 +0800 |
| commit | 2077ebf086543587c4fc7ca9b125809609f749b9 (patch) | |
| tree | 2d8bbbb075809c4dac0a701de238dfaf4d6b092a /src/main/java/me/shedaniel/rei/utils/CollectionUtils.java | |
| parent | 3e5c16747b3403cc4cc725676c13ba50f04d3e9b (diff) | |
| download | RoughlyEnoughItems-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.java | 8 |
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) { |
