- Type Parameters:
E - element type
- All Implemented Interfaces:
Iterable<E>
public final class FastRemovalQueue<E>
extends Object
implements Iterable<E>
Thread-safe queue with O(1) complexity for removal operation.
- Author:
- Nikita Koksharov
-
Constructor Summary
Constructors
-
Method Summary
void
void
boolean
boolean
boolean
int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FastRemovalQueue
public FastRemovalQueue()
-
Method Details
-
add
public void add(E element)
-
moveToTail
public boolean moveToTail(E element)
-
remove
public boolean remove(E element)
-
isEmpty
public boolean isEmpty()
-
-
-
clear
public void clear()
-