/** * Add the pairs obtained from the Cartesian product of transactions and items * * @param trans collection of transactions * @param item the given item * @return <code>true</code> if the set set has been changed */ public boolean addAll(Collection<T> trans, I item) { if (trans == null || trans.isEmpty() || item == null) return false; return matrix.addAll(allTransactions.convert(trans).indices(), itemToIndex(item)); }
/** * Add the pairs obtained from the Cartesian product of transactions and items * * @param trans collection of transactions * @param items collection of items * @return <code>true</code> if the set set has been changed */ public boolean addAll(Collection<T> trans, Collection<I> items) { if (trans == null || trans.isEmpty() || items == null || items.isEmpty()) return false; return matrix.addAll( allTransactions.convert(trans).indices(), allItems.convert(items).indices()); }
/** * Add the pairs obtained from the Cartesian product of transactions and items * * @param trans the given transaction * @param items collection of items * @return <code>true</code> if the set set has been changed */ public boolean addAll(T trans, Collection<I> items) { if (trans == null || items == null || items.isEmpty()) return false; return matrix.addAll(transactionToIndex(trans), allItems.convert(items).indices()); }
/** {@inheritDoc} */ @Override public boolean addAll(Collection<? extends Pair<T, I>> c) { return matrix.addAll(convert(c).matrix); }