Skip to main content
edited title
Link
Jacob
  • 14.8k
  • 69
  • 215
  • 323

Java Collections duplicates

deleted 4 characters in body
Source Link
Jacob
  • 14.8k
  • 69
  • 215
  • 323

I am adding the following to the HashMap collection after each row in the UI form

Declaration

Map<String, List<String>> map = new HashMap<String, List<String>>(); List<String> valSetOne = new ArrayList<String>(); 

Code snippet

 valSetOne.add("Orange""BMW"); valSetOne.add("Apple""Audi"); map.put("A1", valSetOne); 

When I am in the second row in UI, I would like to check the above combination exist in the HashMap collection.

How can I check for the combination of values in each row?

I am adding the following to the HashMap collection after each row in the UI form

Declaration

Map<String, List<String>> map = new HashMap<String, List<String>>(); List<String> valSetOne = new ArrayList<String>(); 

Code snippet

 valSetOne.add("Orange"); valSetOne.add("Apple"); map.put("A1", valSetOne); 

When I am in the second row in UI, I would like to check the above combination exist in the HashMap collection.

How can I check for the combination of values in each row?

I am adding the following to the HashMap collection after each row in the UI form

Declaration

Map<String, List<String>> map = new HashMap<String, List<String>>(); List<String> valSetOne = new ArrayList<String>(); 

Code snippet

 valSetOne.add("BMW"); valSetOne.add("Audi"); map.put("A1", valSetOne); 

When I am in the second row in UI, I would like to check the above combination exist in the HashMap collection.

How can I check for the combination of values in each row?

edited title
Link
Jacob
  • 14.8k
  • 69
  • 215
  • 323

HashMap check duplicate Collections duplicates

Source Link
Jacob
  • 14.8k
  • 69
  • 215
  • 323
Loading