Skip to content

Package: XmlAdaptedMetrics

XmlAdaptedMetrics

nameinstructionbranchcomplexitylinemethod
XmlAdaptedMetrics()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
XmlAdaptedMetrics(List)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getAdaptedMetrics()
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setAdaptedMetrics(List)
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%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.message.xml;
14:
15: import javax.xml.bind.annotation.XmlAccessType;
16: import javax.xml.bind.annotation.XmlAccessorType;
17: import javax.xml.bind.annotation.XmlElement;
18: import javax.xml.bind.annotation.XmlRootElement;
19: import java.util.ArrayList;
20: import java.util.List;
21:
22: @XmlRootElement(name = "metrics")
23: @XmlAccessorType(XmlAccessType.PROPERTY)
24: public class XmlAdaptedMetrics {
25:
26: private List<XmlAdaptedMetric> adaptedMetrics;
27:
28: public XmlAdaptedMetrics() {
29: super();
30: }
31:
32: public XmlAdaptedMetrics(List<XmlAdaptedMetric> adaptedItems) {
33: setAdaptedMetrics(adaptedItems);
34: }
35:
36: @XmlElement(name = "metric")
37: public List<XmlAdaptedMetric> getAdaptedMetrics() {
38:• return adaptedMetrics != null ? adaptedMetrics : new ArrayList<>();
39: }
40:
41: public void setAdaptedMetrics(List<XmlAdaptedMetric> adaptedMetrics) {
42: this.adaptedMetrics = adaptedMetrics;
43: }
44: }