Skip to content

Package: TempPackageRule

TempPackageRule

nameinstructionbranchcomplexitylinemethod
TempPackageRule()
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
addOptions(Option)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
addVariable(AbstractVariableDefinition)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getOptions()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPath()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPosition()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getValue()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getVariable()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setPath(Path)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setPosition(Position)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setValue(RegEx)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: package parser;
2:
3: import java.util.ArrayList;
4: import java.util.List;
5:
6: import model.Position;
7: import model.definition.AbstractVariableDefinition;
8: import model.packages.Option;
9: import model.packages.Path;
10: import model.type.RegEx;
11:
12: /**
13: * is the temporary object for the PackageRule.
14: *
15: * @author Lisa Leitloff
16: *
17: */
18: public class TempPackageRule {
19:         /**
20:          * is the position of the PackageRule.
21:          */
22:         private Position position;
23:         /**
24:          * is the Path, which the PackageRule owns.
25:          */
26:         private Path path;
27:         /**
28:          * is the List of Options of the PackageRule.
29:          */
30:         private final transient List<Option> options;
31:         /**
32:          * is the value of the PackageRule.
33:          */
34:         private RegEx value;
35:         /**
36:          * is the variable, which should have the value "value".
37:          */
38:         private final transient List<AbstractVariableDefinition> variables;
39:
40:         /**
41:          * creates a new TempPackageRule.
42:          */
43:         public TempPackageRule() {
44:                 super();
45:                 this.options = new ArrayList<Option>();
46:                 this.variables = new ArrayList<AbstractVariableDefinition>();
47:         }
48:
49:         /**
50:          * @return the position of the PackageRule.
51:          */
52:         public Position getPosition() {
53:                 return this.position;
54:         }
55:
56:         /**
57:          * sets the Position.
58:          *
59:          * @param position
60:          * is the Position.
61:          */
62:         public void setPosition(final Position position) {
63:                 this.position = position;
64:         }
65:
66:         /**
67:          *
68:          * @return the Path of the PackageRule.
69:          */
70:         public Path getPath() {
71:                 return this.path;
72:         }
73:
74:         /**
75:          * set the Path of the PackageRule.
76:          *
77:          * @param path
78:          * the Path.
79:          */
80:         public void setPath(final Path path) {
81:                 this.path = path;
82:         }
83:
84:         /**
85:          *
86:          * @return the List of Options.
87:          */
88:         public List<Option> getOptions() {
89:                 return new ArrayList<Option>(this.options);
90:         }
91:
92:         /**
93:          * adds an Option.
94:          *
95:          * @param option
96:          * is the Option, which should be added.
97:          */
98:         public void addOptions(final Option option) {
99:                 this.options.add(option);
100:         }
101:
102:         /**
103:          *
104:          * @return the value of the PackageRule.
105:          */
106:         public RegEx getValue() {
107:                 return this.value;
108:         }
109:
110:         /**
111:          * set the value of the package description file.
112:          *
113:          * @param value
114:          * is the value.
115:          */
116:         public void setValue(final RegEx value) {
117:                 this.value = value;
118:         }
119:
120:         /**
121:          *
122:          * @return the VariableDefinition of the PackageRule.
123:          */
124:         public List<AbstractVariableDefinition> getVariable() {
125:                 return new ArrayList<AbstractVariableDefinition>(this.variables);
126:         }
127:
128:         /**
129:          * sets the VariableDefinition.
130:          *
131:          * @param variable
132:          * is the VariableDefinition.
133:          */
134:         public void addVariable(final AbstractVariableDefinition variable) {
135:                 this.variables.add(variable);
136:         }
137:
138: }