Have a look at the API for Collection. You pass an object to the contains method and it returns a boolean.


boolean contains = myCollection.contains("This");