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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -