/** * Build the grouping table forming groups of items with equal keys. This form of grouping allows * a member of the population to be present in zero or more groups, one for each value of the * grouping key. */ private void buildIndexedGroups() throws XPathException { HashMap index = new HashMap(40); XPathContext c2 = keyContext.newMinorContext(); c2.setCurrentIterator(population); while (true) { Item item = population.next(); if (item == null) { break; } processItem(index, item, c2); } }
/*@NotNull*/ public SequenceIterator getAnother() throws XPathException { XPathContext c2 = keyContext.newMinorContext(); return new GroupByIterator(population.getAnother(), keyExpression, c2, collator); }