question: public void clearPaymentMethodsById ( List < String > paymentMethodIdsToRemove ) { if ( UtilValidate . isEmpty ( paymentMethodIdsToRemove ) ) return ; for ( Iterator < CartPaymentInfo > iter = paymentInfo . iterator ( ) ; iter . hasNext ( ) ; ) { CartPaymentInfo info = iter . next ( ) ; if ( paymentMethodIdsToRemove . contains ( info . paymentMethodId ) ) { iter . remove ( ) ; } } }
target:  remove all the paymentMethods based on the paymentMethodIds 