diff options
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt new file mode 100644 index 000000000..6d407da4c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt @@ -0,0 +1,12 @@ +package org.onap.vid.model.aaiTree + +import org.apache.commons.lang.StringUtils + +class NCF(node: AAITreeNode) : InstanceGroup(node) { + val numberOfNetworks: Int = if (node.relationshipList != null && node.relationshipList.relationship != null) { + node.relationshipList.relationship + .filter { StringUtils.equalsIgnoreCase(it.relatedTo, "L3-NETWORK") } + .count() + } else 0 +} + |