summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java4
-rw-r--r--src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java12
2 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java b/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java
index c5f98d8..ac160e0 100644
--- a/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java
+++ b/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java
@@ -87,13 +87,13 @@ public interface IEntityDetails {
* Retrieves map of requirements of the entity instance
* @return map of entity requirement names and corresponding {@link RequirementAssignment} object instances
*/
- Map<String, RequirementAssignment> getRequirements();
+ List<RequirementAssignment> getRequirements();
/**
* Retrieves map of capabilities of the entity instance
* @return map of entity capability names and corresponding {@link CapabilityAssignment} object instances
*/
- Map<String, CapabilityAssignment> getCapabilities();
+ List<CapabilityAssignment> getCapabilities();
/**
* Retrieves list of policy target names
diff --git a/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java b/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java
index f6f961c..57559c6 100644
--- a/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java
+++ b/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java
@@ -67,19 +67,15 @@ public abstract class EntityDetails implements IEntityDetails {
}
@Override
- public Map<String, RequirementAssignment> getRequirements() {
+ public List<RequirementAssignment> getRequirements() {
return entityTemplate.getRequirements()
- .getAll()
- .stream()
- .collect(Collectors.toMap(RequirementAssignment::getName, ra->ra));
+ .getAll();
}
@Override
- public Map<String, CapabilityAssignment> getCapabilities() {
+ public List<CapabilityAssignment> getCapabilities() {
return entityTemplate.getCapabilities()
- .getAll()
- .stream()
- .collect(Collectors.toMap(CapabilityAssignment::getName, ca->ca));
+ .getAll();
}
@Override