Example usage for org.apache.commons.collections.iterators CollatingIterator CollatingIterator

List of usage examples for org.apache.commons.collections.iterators CollatingIterator CollatingIterator

Introduction

In this page you can find the example usage for org.apache.commons.collections.iterators CollatingIterator CollatingIterator.

Prototype

public CollatingIterator(final Comparator comp, final Iterator a, final Iterator b) 

Source Link

Document

Constructs a new CollatingIterator that will use the specified comparator to provide ordered iteration over the two given iterators.

Usage

From source file:net.sourceforge.jasa.market.FourHeapOrderBook.java

@SuppressWarnings("unchecked")
public Iterator<Order> askIterator() {
    return new CollatingIterator(greaterThan, sIn.iterator(), sOut.iterator());
}

From source file:net.sourceforge.jasa.market.FourHeapOrderBook.java

@SuppressWarnings("unchecked")
public Iterator<Order> bidIterator() {
    return new CollatingIterator(lessThan, bIn.iterator(), bOut.iterator());
}