Skip to content

Package: FullIdNode

FullIdNode

nameinstructionbranchcomplexitylinemethod
FullIdNode(IDSectionNode)
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
add(IDSectionNode)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
equals(Object)
M: 14 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getIDSectionNodes()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hashCode()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
interpret(CommunicationManager)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setValue(String)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
toString()
M: 34 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package parser.nodes;
2:
3: import java.util.ArrayList;
4: import java.util.Iterator;
5: import java.util.List;
6:
7: import basic.PruefskriptConstants;
8:
9:
10: /**
11: * TODO:
12: * @author Gruppe X
13: *
14: */
15: public class FullIdNode extends AbstractIdNode {
16:
17:         private final ArrayList<IDSectionNode> sectionNodes;
18:         private String value;
19:         
20:         @Override
21:         public String toString() {
22:                 final StringBuffer returnString = new StringBuffer();
23:                 returnString.append(basic.PruefskriptConstants.IDSETARRAYNODETITLE);
24:                 returnString.append(PruefskriptConstants.BRACKET_OPEN);
25:                 final Iterator<IDSectionNode> it = this.sectionNodes.iterator();
26:•                while (it.hasNext()) {
27:                         returnString.append(it.next().toString());
28:                 }
29:                 returnString.append(PruefskriptConstants.BRACKET_CLOSE);
30:                 return returnString.toString();
31:         }
32:
33:         public FullIdNode(final IDSectionNode section) {
34:                 super();
35:                 this.sectionNodes = new ArrayList<IDSectionNode>();
36:                 this.sectionNodes.add(section);
37:                 this.value = "";
38:         }
39:         
40:
41:         
42:         @Override
43:         public boolean equals(Object obj) {
44:•                return obj instanceof FullIdNode
45:•                                && ((FullIdNode) obj).getIDSectionNodes().equals(this.sectionNodes);
46:         }
47:
48:         @Override
49:         public int hashCode() {
50:                 // TODO Auto-generated method stub
51:                 return 0;
52:         }
53:         
54:         public void setValue(final String value) {
55:                 this.value = value;
56:         }
57:
58:         @Override
59:         public AbstractReturnValue interpret(CommunicationManager mgr) throws PruefscriptException {
60:                 return this.getIDSectionNodes().get(0).interpret(mgr);
61:         }
62:         
63:         public List<IDSectionNode> getIDSectionNodes() {
64:                 return this.sectionNodes;
65:         }
66:         
67:         public void add(IDSectionNode node) {
68:                 this.sectionNodes.add(node);
69:         }
70:
71: }