public boolean retainAll ( Collection < T > trans , I item ) { if ( isEmpty ( ) ) return false ; if ( trans == null || trans . isEmpty ( ) || item == null ) { clear ( ) ; return true ; } return matrix . retainAll ( allTransactions . convert ( trans ) . indices ( ) , itemToIndex ( item ) ) ; }
Retains the pairs obtained from the Cartesian product of transactions and items