Skip to content

Package: KuraInventoryBundles

KuraInventoryBundles

nameinstructionbranchcomplexitylinemethod
KuraInventoryBundles()
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%
addInventoryBundle(KuraInventoryBundle)
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%
getInventoryBundles()
M: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
setInventoryBundles(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) 2021, 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.service.device.call.kura.model.inventory.bundles;
14:
15: import com.fasterxml.jackson.annotation.JsonProperty;
16: import com.fasterxml.jackson.annotation.JsonRootName;
17:
18: import org.checkerframework.checker.nullness.qual.Nullable;
19: import javax.validation.constraints.NotNull;
20: import java.util.ArrayList;
21: import java.util.List;
22:
23: /**
24: * {@link KuraInventoryBundles} definition.
25: *
26: * @since 1.5.0
27: */
28: @JsonRootName("inventoryBundles")
29: public class KuraInventoryBundles {
30:
31: @JsonProperty("bundles")
32: public List<KuraInventoryBundle> inventoryBundles;
33:
34: /**
35: * Gets the {@link KuraInventoryBundle}s {@link List}.
36: *
37: * @return The {@link KuraInventoryBundle}s {@link List}.
38: * @since 1.5.0
39: */
40: public List<KuraInventoryBundle> getInventoryBundles() {
41:• if (inventoryBundles == null) {
42: inventoryBundles = new ArrayList<>();
43: }
44:
45: return inventoryBundles;
46: }
47:
48: /**
49: * Adds a {@link KuraInventoryBundle} to the {@link List}
50: *
51: * @param inventoryBundle The {@link KuraInventoryBundle} to add.
52: * @since 1.5.0
53: */
54: public void addInventoryBundle(@NotNull KuraInventoryBundle inventoryBundle) {
55: getInventoryBundles().add(inventoryBundle);
56: }
57:
58: /**
59: * Sets the {@link KuraInventoryBundle}s {@link List}.
60: *
61: * @param inventoryBundles The {@link KuraInventoryBundle}s {@link List}.
62: * @since 1.5.0
63: */
64: public void setInventoryBundles(@Nullable List<KuraInventoryBundle> inventoryBundles) {
65: this.inventoryBundles = inventoryBundles;
66: }
67:
68: }