@Override public void onSuccess(ImageList imageList, HttpHeaders responseHeaders) throws IOException { // No need to look through these images if the requested image was already found. if (!foundSourceImageHolder[0]) { if (imageList.getItems() != null) { foundSourceImageHolder[0] = imageList .getItems() .stream() .filter(image -> image.getName().equals(sourceImage)) .findFirst() .isPresent(); } } } };
@Override public void onSuccess(ImageList imageList, HttpHeaders responseHeaders) throws IOException { // No need to look through these images if the requested image was already found. if (!foundSourceImageHolder[0]) { if (imageList.getItems() != null) { foundSourceImageHolder[0] = imageList .getItems() .stream() .filter(image -> image.getName().equals(sourceImage)) .findFirst() .isPresent(); } } } };