I found next code example. Who can explain to me how it works.
public static Map expensesByRecipient(List invoices) {