Adding toString() to generic class.