diff options
author | 2020-10-13 21:24:08 +0530 | |
---|---|---|
committer | 2020-10-27 13:15:37 +0530 | |
commit | fadaccdb8396a178134ef95982e96ed8a5cddc26 (patch) | |
tree | d81b7d33dbc373d0656f969e24783aba2aaeae33 /components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java | |
parent | 9170fe0e3aad7a336b0f0d08e63b9de127a9f9de (diff) |
Fix Issues
- Fix certificate issue for authenticated topic
- Fix consumer thread issue
Issue-ID: DCAEGEN2-2485
Signed-off-by: dhebeha <dhebeha.mj71@wipro.com>
Change-Id: I91fe9b1b86579da7142955ac7adaa25ac4bc22e9
Diffstat (limited to 'components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java')
-rw-r--r-- | components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java index 047c9856..b94d75da 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java @@ -22,6 +22,7 @@ package org.onap.slice.analysis.ms.models; +import java.util.List; import java.util.Map; /** @@ -31,6 +32,17 @@ public class MeasurementObject { private String measurementObjectId; private Map<String, Integer> pmData; + public static int findIndex(String measurementObjectId, List<MeasurementObject> list) { + int index = -1; + int len = list.size(); + for(int i=0; i<len ; i++) { + if(measurementObjectId.equals(list.get(i).getMeasurementObjectId())) { + index = i; + } + } + return index; + } + public String getMeasurementObjectId() { return measurementObjectId; } @@ -67,9 +79,10 @@ public class MeasurementObject { final int prime = 31; int result = 1; result = prime * result + ((measurementObjectId == null) ? 0 : measurementObjectId.hashCode()); + result = prime * result + ((pmData == null) ? 0 : pmData.hashCode()); return result; } - + @Override public boolean equals(Object obj) { if (this == obj) @@ -84,6 +97,11 @@ public class MeasurementObject { return false; } else if (!measurementObjectId.equals(other.measurementObjectId)) return false; + if (pmData == null) { + if (other.pmData != null) + return false; + } else if (!pmData.equals(other.pmData)) + return false; return true; } |