class CmAndStackVersionFilter {

    public Predicate<Image> filterCmAndStackVersion(Image currentImage, boolean lockComponents, Map<String, String> activatedParcels,
            Mutable<String> reason) {
        return candidateImage -> {
            updateReason(lockComponents, activatedParcels, reason);
            return isUpgradePermitted(currentImage, lockComponents, activatedParcels, candidateImage);
        };
    }

}