X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=holmes-actions%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fholmes%2Fcommon%2Fapi%2Fstat%2FAlarm.java;h=6d9d60243066e15e731930489e83d46e8e875a13;hb=b6bcfbcc8b7445a953b4d5963dc4ff93028362c5;hp=b6cfc06b4bb3bdc156d6d800d17f00277ea88308;hpb=4f48419205730ecc3e34d93efc99cd76b81f9a59;p=holmes%2Fcommon.git diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/api/stat/Alarm.java b/holmes-actions/src/main/java/org/onap/holmes/common/api/stat/Alarm.java index b6cfc06..6d9d602 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/api/stat/Alarm.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/api/stat/Alarm.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2020 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,28 +78,6 @@ public class Alarm implements AplusData, Cloneable, Serializable { linkIdNodeIdxMap.put(linkId, index); } - /** - * Comparison of the location of different links: 999 the same link: the location of the node - * number less than otherIdIdx in the location of the number (in the otherIdIdx upstream):-1, - * the same link: the node position number is equal to the number of position in the otherIdIdx - * (in the same site otherIdIdx):0, the same link: the node location number is greater than the - * number of locations in otherIdIdx (otherIdIdx) with the site):1, - */ - public int CompareLinkPosition(Map otherIdIdx) { - Set myIdSet = new HashSet<>(); - myIdSet.addAll(this.linkIdNodeIdxMap.keySet()); - myIdSet.retainAll(otherIdIdx.keySet()); - - if (myIdSet.isEmpty()) { - return 999; - } - - for (int tempLinkId : myIdSet) { - return this.linkIdNodeIdxMap.get(tempLinkId) - otherIdIdx.get(tempLinkId); - } - return 999; - } - public boolean containNode(int linkId, int index) { return linkIdNodeIdxMap.containsKey(linkId) && linkIdNodeIdxMap.get(linkId) == index; }