classlib: add missing constructor to PriorityQueue (#680)

This commit is contained in:
Ivan Hetman 2023-04-02 20:23:18 +03:00 committed by GitHub
parent a70251fe83
commit 9201d16853
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,10 @@ public class TPriorityQueue<E> extends TAbstractQueue<E> implements TSerializabl
version = 0; version = 0;
} }
public TPriorityQueue(TComparator<? super E> comparator) {
this(16, comparator);
}
public TPriorityQueue(int initialCapacity, TComparator<? super E> comparator) { public TPriorityQueue(int initialCapacity, TComparator<? super E> comparator) {
if (initialCapacity < 1) { if (initialCapacity < 1) {
throw new TIllegalArgumentException(); throw new TIllegalArgumentException();