/** * Method add found contracts in the new items and revoking items to {@link TransactionPack#subItems} and do it * again for each new item. * Also method add to {@link TransactionPack#referencedItems} referenced contracts from given. * @param c - given contract to extract from. */ protected synchronized void extractAllSubItemsAndReferenced(Contract c) { for (Contract r : c.getRevoking()) { putSubItem(r); for (Contract ref : r.getReferenced()) { addReferencedItem(ref); } } for (Contract n : c.getNew()) { putSubItem(n); extractAllSubItemsAndReferenced(n); } for (Contract ref : c.getReferenced()) { addReferencedItem(ref); } }