List of usage examples for org.apache.commons.collections15.iterators CollatingIterator CollatingIterator
public CollatingIterator(final Comparator<? super E> comp, final Iterator<? extends E> a, final Iterator<? extends E> b)
CollatingIterator
that will use the specified comparator to provide ordered iteration over the two given iterators. From source file:edu.cuny.cat.market.matching.FourHeapShoutEngine.java
@Override public Iterator<Shout> askIterator() { return new CollatingIterator<Shout>(ShoutEngine.AscendingOrder, sIn.iterator(), sOut.iterator()); }
From source file:edu.cuny.cat.market.matching.FourHeapShoutEngine.java
@Override public Iterator<Shout> bidIterator() { return new CollatingIterator<Shout>(ShoutEngine.DescendingOrder, bIn.iterator(), bOut.iterator()); }