diff options
author | 2020-05-11 12:21:21 +0530 | |
---|---|---|
committer | 2020-05-11 12:21:32 +0530 | |
commit | d81155c7bada6a3d70634072274a4c907214807b (patch) | |
tree | 14d5e969d8510edb60a106cd91a7c5977e4d94cf /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java | |
parent | e1dce346175ec18962e8687479da76b59ca75ab2 (diff) |
Removed some code smells
Removed some code smells
Issue-ID: PORTAL-813
Change-Id: Id56bd50ec08132313c06726555ee2dfb8d13245a
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java')
-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(); |