Added generic upper bound support.