Queues are now copyable

This commit is contained in:
2021-10-06 18:47:15 +02:00
parent 61d7a88c82
commit 0c4ef7f6c4
6 changed files with 45 additions and 1 deletions
@@ -100,6 +100,8 @@ public class PRIORITY_QUEUES
public COMPARATOR KEY_SUPER_GENERIC_TYPE comparator() { synchronized(mutex) { return queue.comparator(); } }
@Override
public GENERIC_SPECIAL_KEY_BRACES<E> KEY_SPECIAL_TYPE[] TO_ARRAY(KEY_SPECIAL_TYPE[] input) { synchronized(mutex) { return queue.TO_ARRAY(input); } }
@Override
public PRIORITY_QUEUE KEY_GENERIC_TYPE copy() { throw new UnsupportedOperationException(); }
}
/**
@@ -123,5 +125,7 @@ public class PRIORITY_QUEUES
public void enqueueFirst(KEY_TYPE e) { synchronized(mutex) { dequeue.enqueueFirst(e); } }
@Override
public KEY_TYPE dequeueLast() { synchronized(mutex) { return dequeue.dequeueLast(); } }
@Override
public PRIORITY_DEQUEUE KEY_GENERIC_TYPE copy() { throw new UnsupportedOperationException(); }
}
}