Clover icon

sunshower-core

  1. Project Clover database Fri Apr 6 2018 03:27:42 UTC
  2. Package io.sunshower.service.task

File TaskGraph.java

 

Coverage histogram

../../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

8
15
7
1
64
51
11
0.73
2.14
7
1.57

Classes

Class Line # Actions
TaskGraph 13 15 11
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.service.task;
2   
3    import java.util.Collections;
4    import java.util.HashSet;
5    import java.util.Set;
6    import javax.xml.bind.annotation.XmlAttribute;
7    import javax.xml.bind.annotation.XmlElement;
8    import javax.xml.bind.annotation.XmlElementWrapper;
9    import javax.xml.bind.annotation.XmlRootElement;
10   
11    /** Created by haswell on 3/26/17. */
12    @XmlRootElement(name = "task-graph")
 
13    public class TaskGraph {
14   
15    @XmlElement(name = "node")
16    @XmlElementWrapper(name = "nodes")
17    private Set<Node> nodes;
18   
19    @XmlElement(name = "edges")
20    @XmlElementWrapper(name = "edges")
21    private Set<Edge> edges;
22   
23    @XmlAttribute private String format;
24   
 
25  0 toggle public Set<Node> getNodes() {
26  0 if (nodes == null) {
27  0 return Collections.emptySet();
28    }
29  0 return nodes;
30    }
31   
 
32  0 toggle public void setNodes(Set<Node> nodes) {
33  0 this.nodes = nodes;
34    }
35   
 
36  0 toggle public Set<Edge> getEdges() {
37  0 if (edges == null) {
38  0 return Collections.emptySet();
39    }
40  0 return edges;
41    }
42   
 
43  0 toggle public void setEdges(Set<Edge> edges) {
44  0 this.edges = edges;
45    }
46   
 
47  0 toggle public void addNode(Node node) {
48  0 if (nodes == null) {
49  0 nodes = new HashSet<>();
50    }
51  0 nodes.add(node);
52    }
53   
 
54  0 toggle public void addEdge(Edge edge) {
55  0 if (edges == null) {
56  0 edges = new HashSet<>();
57    }
58  0 edges.add(edge);
59    }
60   
 
61  0 toggle public String getFormat() {
62  0 return format;
63    }
64    }