/** * Return a Map of named objects derived from any iterator nodes attached to * this one as children. The iteration strategy is derived from the * JoinIterator which performs a cross product or orthoganol join across all * the sub-iterators */ public Object next() { // Result will be an array of Map objects, convert to a Map i.e. // convert [{foo->bar}],[{urgle->wibble}] to {foo->bar,urgle->wibble} // and return Object[] o = (Object[]) iterator.next(); Map[] map = new Map[o.length]; for (int i = 0; i < o.length; i++) { map[i] = (Map) o[i]; } Map result = new HashMap(); for (int j = 0; j < map.length; j++) { for (Iterator i = map[j].keySet().iterator(); i.hasNext();) { String name = (String) i.next(); Object value = map[j].get(name); result.put(name, value); } } return result; }