java - Which Map provides moving objects to different index? -


i need map takes key-value pair (probably hashmap<string, object>) whereas key property of object itself, like:

class person {   string name; //i know string not unique key, ok illustrate example }  person person = new person("john"); map.put(person.getname(), person); 

further, map must provide accessor similar arraylist.add(idx, object). should thereby possible reorder object different position , adjust rest accordingly.

which map/list suitable this?

(by way: should runable gwt, external libs might problematic).

there's no single standard container of this.

however, combination of map , arraylist satisfy of requirements.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -