예제 #1
0
  @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();
  }
예제 #2
0
 @Override
 public List<PhotoModel> getPhotos() {
   return album.getPhotos();
 }