question: static < E > E checkType ( E obj , Class < ? extends E > type ) { if ( obj != null && ! type . isInstance ( obj ) ) { throw new ClassCastException ( "Attempt to insert element of type " + obj . getClass ( ) + " into collection of type " + type ) ; } return obj ; }
target:  Checks if specified object is instance of specified class. Used for a dynamically typesafe view of the collections.