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
Post a Comment