info.bitrich.xchangestream.poloniex.utils.MinMaxPriorityQueueUtils Maven / Gradle / Ivy
package info.bitrich.xchangestream.poloniex.utils;
import com.google.common.collect.MinMaxPriorityQueue;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
public class MinMaxPriorityQueueUtils {
public static List toList(MinMaxPriorityQueue queue, Comparator super T> comparator) {
List list = new ArrayList(queue.size());
for (T e : queue) list.add(e);
if (comparator != null) {
list.sort(comparator);
}
return list;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy