Разделить заказы пациента по условиям
Есть коллекция с заказами клиентов.
List<Order> orderList;
Order
содержит следующие поля:
id_client - уникальный номер клиента
status - Статус заказа
cito - Срочность заказа
Как можно разделить заказы клиента по условию что если у одного клиента были заказы с одним статусом и cito в одну коллекцию, а другие в другую коллекцию?
Класс Order
public class Order {
private int client_id;
private int type;
private String city;
public Order() {
}
public int getClient_id() {
return client_id;
}
public void setClient_id(int client_id) {
this.client_id = client_id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
}