So i have input like this:
 [1]     name1 + type1 + value1
 [X]     nameX + typeX + valueX
now i am looking at input like this:
 [2]     name1 + type2 + value2
so [2] has same name as [1] but their properites are different.
i put the name,type,value in a class like this:
 class entity(){
 String name;
 String type;
 int amount;
 //constructor ... etc...
 ...
 }
what i want to do is put entity into a hashmap with the key being the name and the value being the class entity.
like this
  name1 ----> entity1
  nameX -----> entityX
the problem i am having is when i try to put [2] into the hashmap it has the same name as [1] so it doesnt hash properly ([2] overrides [1] since they have the same name.
i will need to later access [1] and [2] by their name when i search for it.. how would i enter it into the map so it wont override it.