]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/TreeTestResultCollection.java
Make default execution ressources temp dir dependent of the JVM OS user, in order...
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / test / tree / TreeTestResultCollection.java
1 /*
2 * Copyright (C) 2007-2012 Mathieu Baudier
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.slc.core.test.tree;
17
18 import java.util.SortedSet;
19 import java.util.TreeSet;
20
21 public class TreeTestResultCollection implements
22 Comparable<TreeTestResultCollection> {
23 private String id;
24 private SortedSet<TreeTestResult> results = new TreeSet<TreeTestResult>();
25
26 public TreeTestResultCollection() {
27 }
28
29 public TreeTestResultCollection(String id) {
30 this.id = id;
31 }
32
33 public String getId() {
34 return id;
35 }
36
37 public void setId(String id) {
38 this.id = id;
39 }
40
41 public SortedSet<TreeTestResult> getResults() {
42 return results;
43 }
44
45 public void setResults(SortedSet<TreeTestResult> results) {
46 this.results = results;
47 }
48
49 public int compareTo(TreeTestResultCollection o) {
50 return getId().compareTo(o.getId());
51 }
52
53 @Override
54 public boolean equals(Object o) {
55 if (o instanceof TreeTestResultCollection) {
56 return getId().equals(((TreeTestResultCollection) o).getId());
57 }
58 return false;
59 }
60 }