@Override public List<PhotoModel> getPhotosByDate(Date startDate, Date endDate) { for (PhotoModel photo : getPhotos()) { if (photo.getDate().after(startDate) && photo.getDate().before(endDate)) album.addPhoto(photo); else if (photo.getDate().equals(startDate)) album.addPhoto(photo); else if (photo.getDate().equals(endDate)) album.addPhoto(photo); } Collections.sort(getPhotos()); return getPhotos(); }
@Override public List<PhotoModel> getPhotos() { return album.getPhotos(); }