OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 80 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 80 Rev 156
Line 11... Line 11...
11
 * When distributing the software, include this License Header Notice in each file.
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.erp.modules;
14
 package org.openconcerto.erp.modules;
15
 
15
 
-
 
16
import java.util.Objects;
-
 
17
 
16
public class DepSolverResult {
18
public class DepSolverResult {
17
 
19
 
18
    static public interface Factory {
20
    static public interface Factory {
19
        DepSolverResult create(DepSolverResult parent, int tryCount, String error, DepSolverGraph graph);
21
        DepSolverResult create(DepSolverResult parent, int tryCount, String error, DepSolverGraph graph);
20
    }
22
    }
Line 25... Line 27...
25
    private final DepSolverGraph graph;
27
    private final DepSolverGraph graph;
26
 
28
 
27
    public DepSolverResult(DepSolverResult parent, int tryCount, String error, DepSolverGraph graph) {
29
    public DepSolverResult(DepSolverResult parent, int tryCount, String error, DepSolverGraph graph) {
28
        super();
30
        super();
29
        this.parent = parent;
31
        this.parent = parent;
-
 
32
        if (tryCount < 0)
-
 
33
            throw new IllegalArgumentException("Negative try count : " + tryCount);
30
        this.triesCount = tryCount;
34
        this.triesCount = tryCount;
31
        this.error = error;
35
        this.error = error;
32
        this.graph = graph;
36
        this.graph = Objects.requireNonNull(graph, "graph");
33
    }
37
    }
34
 
38
 
35
    /**
39
    /**
36
     * The result that led to this one. E.g. there could have been a missing dependency for the
40
     * The result that led to this one. E.g. there could have been a missing dependency for the
37
     * latest version of a module and thus this result contains an older version of the module.
41
     * latest version of a module and thus this result contains an older version of the module.