私はList<List<String>>
このようにデータを持っています、
List<List<String>> repdata = [
["1185","R","4t","G","06","L","GT","04309","2546","2015","CF FE","01H1","20","23840","FF20"],
["1192","R","11t","H","06","L","SA","04772","8345","2015","BZ C8 FE","01D6","13","33390","LC13"]]
特に、インナーリストのインデックス 14 の値を削除したいと思います。
例:この内部リストデータ
[["1185","R","4t","G","06","L","GT","04309","2546","2015","CF FE","01H1","20","23840","FF20"]]
FF20を削除したいのですが、
そして、これは のすべての内部リストに対して繰り返されなければなりませんList<List<String>> repdata
。
だから、私の最終List<List<String>>
はこのようになるだろう、
List<List<String>> repdata = [
["1185","R","4t","G","06","L","GT","04309","2546","2015","CF FE","01H1","FF20","23840"],
["1192","R","11t","H","06","L","SA","04772","8345","2015","BZ C8 FE","01D6","13","33390"]
実際にはこれList<List<String>> repdata is = criteria.list()
は休止状態からです。このように変換され、
criteria.setResultTransformer(Transformers.TO_LIST);
私はこのように削除するのにうんざりしました、
List<List<String>> repdata = cr.list();
for( List<String> list: repdata ){
if( list.size() > 14){
list.remove(14);
}
}
しかし、私は継続的に取得してUnsupportedOperationException
います。
誰でもこの問題で私を助けることができますか?