package com.iqser.red.service.persistence.service.v1.api.shared.model.warning;

import java.util.Collections;
import java.util.Comparator;
import java.util.Set;

import lombok.experimental.UtilityClass;

@UtilityClass
public class WarningsComparatorUtils {


    public static final Comparator<Set<Integer>> LIST_COMPARATOR = Comparator.comparingInt(Collections::min);

    public static final Comparator<WarningModel> WARNING_MODEL_COMPARATOR = (wm1, wm2) -> LIST_COMPARATOR.compare(wm1.getPages(), wm2.getPages());
}
