Record Class CollectionPredicate<T, P extends Predicate<T>>

java.lang.Object
java.lang.Record
net.minestom.server.instance.block.predicate.CollectionPredicate<T,P>
Type Parameters:
T - Type of item in the collection
P - A Predicate that matches against items of type T
Record Components:
contains - A set of sub-predicates which all must return true for this CollectionPredicate to return true
counts - A set of sub-predicates which all must match a certain number of times for this CollectionPredicate to return true
size - An acceptable range for the collection's size
All Implemented Interfaces:
Predicate<Collection<T>>

public record CollectionPredicate<T, P extends Predicate<T>>(@Nullable CollectionPredicate.Contains<T, P extends Predicate<T>> contains, @Nullable CollectionPredicate.Count<T, P extends Predicate<T>> counts, Range.Int size) extends Record implements Predicate<Collection<T>>
A generic predicate to match against a collection of items.

If any fields are null, they are ignored in test(Collection). If all fields are null, test(Collection) returns true.