私はMap
このようなものを持っています:
Map<String,GridCell> cellsMap
これをメソッドに渡すと、そのメソッドからの戻り値には、 mapのすべてのエントリと、 a をキーとして、 aを value として含む追加のエントリMap
を含む a (say ) が含まれている必要があります。何かのようなもの :answerMap
cellsMap
String
String
Map<String,Object> answerMap = new ConcurrentHashMap<String,Object>();
//answer should first contain all the map entries of cellsMap and then add an extra entry like the following
answer.put(getId(), getSelectionValue()); // getSelectionValue() returns a String that contains coordinates of the selected cells.
return answerMap;