diff options
author | Lorraine Welch <lb2391@att.com> | 2020-05-14 02:49:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-14 02:49:55 +0000 |
commit | 1b8bb8e7ac796c92f853107c4504ff7c1757861b (patch) | |
tree | 201c475bfbeffdf813d246053154d8e703159a9e /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node | |
parent | b07dd059a8a9ef3eac9c5184862754046b9212d6 (diff) | |
parent | d81155c7bada6a3d70634072274a4c907214807b (diff) |
Merge "Removed some code smells"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java | 86 |
1 files changed, 2 insertions, 84 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java index e630f52c..320f15c9 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java @@ -99,93 +99,11 @@ public class NodeCollection { public HashMap<String,NodeInfo> getNodeCollection() { return nodeCollection; } - -/* public NodeInfo getNode(String nodeID) { - for (NodeInfo nodeInfo : nodeCollection) { - if (nodeInfo.getNodeID().equalsIgnoreCase(nodeID) ) { - return nodeInfo; - } - } - - return null; - } -*/ -/* public NodeInfo getNode(String nodeID, String nodeType) { - for (NodeInfo nodeInfo : nodeCollection) { - if (nodeInfo.getNodeID().equalsIgnoreCase(nodeID) && nodeInfo.getNodeType().equalsIgnoreCase(nodeType)) { - return nodeInfo; - } - } - - return null; - } -*/ + public NodeInfo getNode(String nodeType) { return (NodeInfo)nodeCollection.get(nodeType); } -/* public ArrayList<NodeInfo> getWildCardNode(String nodeID, String nodeType) { - ArrayList<NodeInfo> list = new ArrayList<NodeInfo>(); - - for (NodeInfo nodeInfo : nodeCollection) { - if (nodeInfo.getNodeType().equalsIgnoreCase(nodeType) && - nodeInfo.getNodeID().toLowerCase().indexOf(nodeID.toLowerCase()) != -1) { - list.add(nodeInfo); - } - } - - return list; - }*/ - -/* public NodeInfo removeNode(String nodeID) { - for (int i = 0; i < nodeCollection.size(); i++) { - if (nodeCollection.get(i).getNodeID().equalsIgnoreCase(nodeID)) { - return nodeCollection.remove(i); - } - } - - removeSelectedNode(nodeID); - return null; - } - - public NodeInfo removeNode(String nodeID, String nodeType) { - for (int i = 0; i < nodeCollection.size(); i++) { - if (nodeCollection.get(i).getNodeID().equalsIgnoreCase(nodeID) && - nodeCollection.get(i).getNodeType().equalsIgnoreCase(nodeType)) { - return nodeCollection.remove(i); - } - } - - removeSelectedNode(nodeID, nodeType); - return null; - } -*/ -/* public void removeNode(String nodeType) { - nodeCollection.remove(nodeType); - }*/ - -/* public ArrayList<NodeInfo> getCellsiteLocation(String location, boolean exactMatch) { - ArrayList<NodeInfo> list = new ArrayList<NodeInfo>(); - - for (NodeInfo nodeInfo : nodeCollection) { - if (nodeInfo.getAttribute("Location") == null) { - continue; - } - - if (exactMatch) { - if (nodeInfo.getAttribute("Location").equalsIgnoreCase(location)) { - list.add(nodeInfo); - } - } - else { - if (nodeInfo.getAttribute("Location").toUpperCase().indexOf(location.toUpperCase()) != -1) { - list.add(nodeInfo); - } - } - } - - return list; - } -*/ + public void clearNode() { nodeCollection.clear(); selectedNode.clear(); |