- public boolean contains(Photo inPhoto)
- {
- // Check if we need to check
- if (getNumPhotos() <= 0 || inPhoto == null || inPhoto.getFile() == null)
- return false;
- // Loop around photos in list
- for (int i=0; i<getNumPhotos(); i++)
- {
- if (getPhoto(i) != null && getPhoto(i).equals(inPhoto))
- {
- return true;
- }
- }
- // not found
- return false;