Class FifoQueueNoDuplicates<T>
java.lang.Object
com.ibm.wala.util.collections.FifoQueue<T>
com.ibm.wala.util.collections.FifoQueueNoDuplicates<T>
FIFO work queue management of Objects that prevents an Object from being added to the queue if it
was ever previously enqueued.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
everContained
(T element) Indicate whether the specified element was ever in the queue.Return an Iterator over the set of all the nodes that were pushed into the queue.void
Insert all of the elements in the specified Iterator at the tail end of the queue if never previously pushed into the queue.void
Insert an Object at the tail end of the queue if it was never pushed into the queue.Return the set of objects that have been queued.
-
Constructor Details
-
FifoQueueNoDuplicates
public FifoQueueNoDuplicates()
-
-
Method Details
-
getPushedNodes
-
push
Insert an Object at the tail end of the queue if it was never pushed into the queue.This method determines whether an element was ever in the queue using the element's
equals()
method. If the element's class does not implementequals()
, the default implementation assumes they are equal if it is the same object. -
push
Insert all of the elements in the specified Iterator at the tail end of the queue if never previously pushed into the queue.This method determines whether an element was ever pushed into the queue using the element's
equals()
method. If the element's class does not implementequals()
, the default implementation assumes that two elements are equal if they are the same object.- Overrides:
push
in classFifoQueue<T>
- Parameters:
elements
- an Iterator of Objects to be added to the queue if never already queued.- Throws:
IllegalArgumentException
- if elements == null
-
everContained
Indicate whether the specified element was ever in the queue.- Parameters:
element
- determine whether this object is in the queue.- Returns:
true
ifelement
is in the queue. Otherwisefalse
.
-
queuedSet
-