Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. package repositories;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. import model.Item;
  6.  
  7.  
  8. public class ItemRepository{
  9.  
  10. private final List<Item> items;
  11.  
  12. public ItemRepository() {
  13. items = new ArrayList<>();
  14. }
  15.  
  16. public void addItem(Item item){
  17. items.add(item);
  18. }
  19. public void removeItem(Item item){
  20. items.remove(item);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement