blob: d4dc7e0c4b5c3523b7658046b9c70d05b10125c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen;
import com.amdocs.zusammen.adaptor.inbound.api.types.item.ZusammenElement;
import java.util.Objects;
class VspZusammenUtil {
static ZusammenElement aggregateElements(ZusammenElement... elements) {
ZusammenElement head = null;
ZusammenElement father = null;
for (ZusammenElement element : elements) {
if (Objects.isNull(head)) {
head = father = element;
} else {
if (father != null) {
father.getSubElements().add(element);
father = element;
}
}
}
return head;
}
}
|