public Client findById(long id) { for (Client client : clients) { if (client.getId_client() == id) { return client; } } return null; }
public void deleteClientById(long id) { for (Iterator<Client> iterator = clients.iterator(); iterator.hasNext(); ) { Client client = iterator.next(); if (client.getId_client() == id) { iterator.remove(); } } }