Split the previous method into two methods, one for getting all Set with all the nodes and one for getting a Map for specified nodes and value.