Guava migration - Inline Predicates.compose

This commit is contained in:
Jetz
2024-09-06 19:48:19 -04:00
parent 6e3726ee79
commit 4c8a94b18a
7 changed files with 13 additions and 15 deletions

View File

@@ -782,7 +782,7 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
Iterable<Entry<T, Integer>> items = pool;
if (useFilter) {
Predicate<Entry<T, Integer>> pred = Predicates.compose(filterPredicate, (Function<Entry<T, Integer>, T>) Entry::getKey);
Predicate<Entry<T, Integer>> pred = x -> filterPredicate.test(x.getKey());
items = Iterables.filter(pool, pred);
}
model.addItems(items);