-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
11
A DESCRIPTION OF THE PROBLEM :
The Collection.contains method is obviously useful and readable for checking if an element exists within a collection.
I think it would also be useful to have a Collection.doesNotContain method which is simply the opposite.
I realise that this can be easily achieved with the not (!) operator on the existing method. However, I think it would be nice to have a native method that reads like plain English.
There are several use cases where this kind of syntax would be preferable, such as checking a deny list for a provided value.
The Collection.contains method is obviously useful and readable for checking if an element exists within a collection.
I think it would also be useful to have a Collection.doesNotContain method which is simply the opposite.
I realise that this can be easily achieved with the not (!) operator on the existing method. However, I think it would be nice to have a native method that reads like plain English.
There are several use cases where this kind of syntax would be preferable, such as checking a deny list for a provided value.