mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-02 18:33:42 +02:00
28 lines
550 B
Java
28 lines
550 B
Java
![]() |
package catering.order;
|
||
|
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Set;
|
||
|
|
||
|
/**
|
||
|
* This class is only used for the prototype to avoid using the bloated Salespoint API
|
||
|
*/
|
||
|
public class CustomOrderRepository {
|
||
|
private Set<CustomOrder> orders;
|
||
|
|
||
|
public CustomOrderRepository() {
|
||
|
this.orders = new HashSet<>();
|
||
|
}
|
||
|
|
||
|
public boolean addOrder(CustomOrder order) {
|
||
|
return this.orders.add(order);
|
||
|
}
|
||
|
|
||
|
public boolean removeOrder(CustomOrder order) {
|
||
|
return this.orders.remove(order);
|
||
|
}
|
||
|
|
||
|
public Set<CustomOrder> getOrders() {
|
||
|
return this.orders;
|
||
|
}
|
||
|
}
|