public ArrayList<LaundrySlot> getOnlyMySlots() { ArrayList<LaundrySlot> slots = new ArrayList<LaundrySlot>(); for (LaundrySlot slot : this.knownLaundrySlots) { if (slot.getSlotState() == LaundrySlot.STATUS_SLOT_BOOKED_ME) { slots.add(slot); } } return slots; }
public ArrayList<LaundrySlot> getAllSlotsBetweenDays(Date minDate, Date maxDate) { ArrayList<LaundrySlot> slots = new ArrayList<LaundrySlot>(); for (LaundrySlot slot : this.knownLaundrySlots) { long laundTime = slot.getLaundryDate().getTime(); if (laundTime >= minDate.getTime() && laundTime <= maxDate.getTime()) { slots.add(slot); } } return slots; }