class PostContingencyResultComparator implements Comparator<PostContingencyResult> {

    @Override
    public int compare(PostContingencyResult result1, PostContingencyResult result2) {
        Objects.requireNonNull(result1);
        Objects.requireNonNull(result2);
        return result1.getContingency().getId().compareTo(result2.getContingency().getId());
    }

}