comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation.java @ 2624:3f24865082da

Generate error message when more than one Q is found for given Q in "W auf freier Strecke". flys-artifacts/trunk@4212 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 11 Apr 2012 10:14:13 +0000
parents 6f4a1f513e89
children f46caf95ab7f
comparison
equal deleted inserted replaced
2623:c4591312f3d3 2624:3f24865082da
90 problems = new ArrayList<Problem>(); 90 problems = new ArrayList<Problem>();
91 } 91 }
92 return problems; 92 return problems;
93 } 93 }
94 94
95 public void addProblems(Calculation other) {
96 List<Problem> otherProblems = other.problems;
97 if (otherProblems != null) {
98 List<Problem> problems = checkProblems();
99 for (Problem problem: otherProblems) {
100 if (!problems.contains(problem)) {
101 problems.add(problem);
102 }
103 }
104 }
105 }
106
95 public void addProblem(Problem problem) { 107 public void addProblem(Problem problem) {
96 List<Problem> problems = checkProblems(); 108 List<Problem> problems = checkProblems();
97 if (!problems.contains(problem)) { 109 if (!problems.contains(problem)) {
98 problems.add(problem); 110 problems.add(problem);
99 } 111 }

http://dive4elements.wald.intevation.org