All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.bitrich.xchangestream.poloniex.utils.MinMaxPriorityQueueUtils Maven / Gradle / Ivy

There is a newer version: 5.0.3
Show newest version
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 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