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; }
public void doRows(Parse rows) { try { bind(rows.parts); results = query(); match(list(rows.more), list(results), 0); Parse last = rows.last(); last.more = buildRows(surplus.toArray()); mark(last.more, "surplus"); mark(missing.iterator(), "missing"); } catch (Exception e) { exception (rows.leaf(), e); } }
@Override public void doRows(Parse rows) { try { bindColumnHeadersToMethodsAndFields(rows.parts); results = query(); match(list(rows.more), list(results), 0); Parse last = rows.last(); last.more = buildRows(surplus.toArray()); mark(last.more, "surplus"); mark(missing.iterator(), "missing"); } catch (Exception e) { exception(rows.leaf(), e); } }
@Override public void doRows(Parse rows) { try { bindColumnHeadersToMethodsAndFields(rows.parts); results = query(); match(list(rows.more), list(results), 0); Parse last = rows.last(); last.more = buildRows(surplus.toArray()); mark(last.more, "surplus"); mark(missing.iterator(), "missing"); } catch (Exception e) { exception(rows.leaf(), e); } }
protected Parse buildCells(Object row) { if (row == null) { Parse nil = new Parse("td", "null", null, null); nil.addToTag(" colspan="+columnBindings.length); return nil; } Parse root = new Parse(null, null, null, null); Parse next = root; for (int i=0; i<columnBindings.length; i++) { next = next.more = new Parse("td", " ", null, null); TypeAdapter a = columnBindings[i]; if (a == null) { ignore (next); } else { try { a.target = row; info(next, a.toString(a.get())); } catch (Exception e) { exception(next, e); } } } return root.more; } }
protected Parse buildCells(Object row) { if (row == null) { Parse nil = new Parse("td", "null", null, null); nil.addToTag(" colspan=" + columnBindings.length); return nil; } Parse root = new Parse(null, null, null, null); Parse next = root; for (Binding columnBinding : columnBindings) { next = next.more = new Parse("td", " ", null, null); TypeAdapter a = columnBinding.adapter; if (a == null) { ignore(next); } else { try { a.target = row; next.body = gray(escape(a.toString(a.get()))); } catch (Exception e) { exception(next, e); } } } return root.more; } }
protected Parse buildCells(Object row) { if (row == null) { Parse nil = new Parse("td", "null", null, null); nil.addToTag(" colspan=" + columnBindings.length); return nil; } Parse root = new Parse(null, null, null, null); Parse next = root; for (Binding columnBinding : columnBindings) { next = next.more = new Parse("td", " ", null, null); TypeAdapter a = columnBinding.adapter; if (a == null) { ignore(next); } else { try { a.target = row; next.body = gray(escape(a.toString(a.get()))); } catch (Exception e) { exception(next, e); } } } return root.more; } }