class ImageCreationBasedFilter {

    public Predicate<Image> filterPreviousImages(Image currentImage, Mutable<String> reason) {
        return candidate -> {
            reason.setValue("There are no newer images available than " + currentImage.getDate() + ".");
            return isDifferentVersion(currentImage, candidate) || isNewerOrSameCreationImage(currentImage, candidate);
        };
    }

}