protected Map<Object, Object> cSort(List<?> list, int col) { TypeAdapter a = columnBindings[col].adapter; Map<Object, Object> result = new HashMap<>(list.size()); for (Object row : list) { try { a.target = row; Object key = a.get(); bin(result, key, row); } catch (Exception e) { // surplus anything with bad keys, including null surplus.add(row); } } return result; }
protected Map<Object, Object> cSort(List<?> list, int col) { TypeAdapter a = columnBindings[col].adapter; Map<Object, Object> result = new ConcurrentHashMap<>(list.size()); for (Object row : list) { try { a.target = row; Object key = a.get(); bin(result, key, row); } catch (Exception e) { // surplus anything with bad keys, including null surplus.add(row); } } return result; }
protected Map cSort(List list, int col) { TypeAdapter a = columnBindings[col]; Map result = new HashMap(list.size()); for (Iterator<?> i=list.iterator(); i.hasNext(); ) { Object row = i.next(); try { a.target = row; Object key = a.get(); bin(result, key, row); } catch (Exception e) { // surplus anything with bad keys, including null surplus.add(row); } } return result; }
protected Map eSort(List<Parse> list, int col) { TypeAdapter a = columnBindings[col]; Map result = new HashMap(list.size()); for (Iterator<Parse> i=list.iterator(); i.hasNext(); ) { Parse row = i.next(); Parse cell = row.parts.at(col); try { Object key = a.parse(cell.text()); bin(result, key, row); } catch (Exception e) { exception(cell, e); for (Parse rest=cell.more; rest!=null; rest=rest.more) { ignore(rest); } } } return result; }
protected Map<Object, Object> eSort(List<?> list, int col) { TypeAdapter a = columnBindings[col].adapter; Map<Object, Object> result = new ConcurrentHashMap<>(list.size()); for (Object o : list) { Parse row = (Parse) o; Parse cell = row.parts.at(col); try { Object key = a.parse(cell.text()); bin(result, key, row); } catch (Exception e) { exception(cell, e); for (Parse rest = cell.more; rest != null; rest = rest.more) { ignore(rest); } } } return result; }
protected Map<Object, Object> eSort(List<?> list, int col) { TypeAdapter a = columnBindings[col].adapter; Map<Object, Object> result = new HashMap<>(list.size()); for (Object o : list) { Parse row = (Parse) o; Parse cell = row.parts.at(col); try { Object key = a.parse(cell.text()); bin(result, key, row); } catch (Exception e) { exception(cell, e); for (Parse rest = cell.more; rest != null; rest = rest.more) { ignore(rest); } } } return result; }