Skip to content

Package: NewSwitchAction

NewSwitchAction

nameinstructionbranchcomplexitylinemethod
NewSwitchAction(ConfigurationGraph)
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%
createNode(Point)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package networkconfigurator.actions;
2:
3: import java.awt.Point;
4:
5: import networkconfigurator.ConfigurationGraph;
6: import networkconfigurator.item.Node;
7: import networkconfigurator.item.Switch;
8:
9: /**
10: * Action for adding a new Switch.
11: *
12: * @author Erik Arand
13: *
14: */
15: public class NewSwitchAction extends AbstractNewAction {
16:         /**
17:          * action for a new Internet-Object.
18:          *
19:          * @param graph
20:          * the graph.
21:          */
22:         public NewSwitchAction(final ConfigurationGraph graph) {
23:                 super(graph);
24:         }
25:
26:         @Override
27:         protected Node createNode(final Point p) {
28:                 return new Switch(p);
29:         }
30:
31: }