public static Image findImageById ( String imageId , List < Image > images ) { Image result = null ; for ( Image img : images ) { if ( img . getId ( ) . equals ( imageId ) ) { result = img ; break ; } } return result ; }
Finds an image by ID .