View Javadoc

1   /*
2    * Copyright 2006 Outsource Cafe, Inc.
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.javagen.funcgen.model;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import javax.xml.bind.annotation.XmlRootElement;
22  
23  import org.javagen.agile.core.model.AbstractModel;
24  
25  /***
26   * A permutation represents a specific test property and a set of values for that property 
27   * that are to be tested.
28   *
29   * @author Richard Easterling
30   */
31  @XmlRootElement
32  public class Permutations extends AbstractModel {
33  
34      public static final String DEFAULT_MODEL_TYPE = "permutations";
35      
36      protected List<String> values;
37      
38      public Permutations() {
39          super();
40          this.setModelType(DEFAULT_MODEL_TYPE);
41      }
42      
43      public Permutations(String name) {
44          this();
45          this.setName(name);
46      }
47      
48      public List<String> getValue() {
49          return values;
50      }
51  
52      public void setValue(List<String> values) {
53          this.values = values;
54      }
55  
56      public void addValue(String value) {
57          if (values==null)
58              values = new ArrayList<String>();
59          values.add(value);
60      }
61  
62  
63  
64  }