The Collection.contains() method check if a collection contains a given object, using the .equals() method to perform the comparison.
.equals()
From Java7 Javadoc
For those of us using Java 8, Collection#stream() is a clean option:
collection.stream().anyMatch(x -> x == key)