@ SuppressWarnings ( "unchecked" ) public boolean contains ( final Object key ) { // validate key if ( key == null ) { throw new IllegalArgumentException ( "Null element is not supported." ) ; } // find element final int hashCode = ( ( T ) key ) . hashCode ( ) ; final int index = getIndex ( hashCode ) ; return containsElem ( index , ( T ) key , hashCode ) ; }
Check if the set contains given element