Check whether the collection contains an object or not.
the collection
object to check
whether the collection contains this object