comparison src/luan/LuanTable.java @ 1708:8d257d56dc42

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 Jul 2022 14:06:59 -0600
parents 93b9fd13a06c
children b1b1f9a14928
comparison
equal deleted inserted replaced
1707:ad5647031343 1708:8d257d56dc42
257 mapToList(); 257 mapToList();
258 } 258 }
259 259
260 public Object removeFromList(int pos) throws LuanException { 260 public Object removeFromList(int pos) throws LuanException {
261 checkMutable(); 261 checkMutable();
262 try { 262 return list().remove(pos-1);
263 return list().remove(pos-1);
264 } catch(IndexOutOfBoundsException e) {
265 throw new LuanException("index out of bounds - "+e.getMessage());
266 }
267 } 263 }
268 264
269 public void rawSort(Comparator<Object> cmp) throws LuanException { 265 public void rawSort(Comparator<Object> cmp) throws LuanException {
270 checkMutable(); 266 checkMutable();
271 Collections.sort(list(),cmp); 267 Collections.sort(list(),cmp);