Package com.zebra.rfid.api3
Class Queue
java.lang.Object
com.zebra.rfid.api3.Queue
implements a simple queue mechanism. Allows for enumeration of the
elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondequeue()Dequeue the oldest object on the queue.dequeue(long timeOut) Dequeue the oldest object on the queue.voidfinal Enumerationelements()Returns an enumeration of the elements in Last-In, First-Out order.voidEnqueue an object.booleanisEmpty()Is the queue empty?final EnumerationReturns an enumeration of the elements in First-In, First-Out order.
-
Constructor Details
-
Queue
public Queue()
-
-
Method Details
-
enqueue
Enqueue an object. -
dequeue
Dequeue the oldest object on the queue. Will wait indefinitely.- Returns:
- the oldest object on the queue.
- Throws:
InterruptedException- if any thread has interrupted this thread.
-
dequeue
Dequeue the oldest object on the queue.- Parameters:
timeOut- the number of milliseconds to wait for something to arrive.- Returns:
- the oldest object on the queue.
- Throws:
InterruptedException- if any thread has interrupted this thread.
-
isEmpty
public boolean isEmpty()Is the queue empty?- Returns:
- true if the queue is empty.
-
elements
Returns an enumeration of the elements in Last-In, First-Out order. Use the Enumeration methods on the returned object to fetch the elements sequentially. -
reverseElements
Returns an enumeration of the elements in First-In, First-Out order. Use the Enumeration methods on the returned object to fetch the elements sequentially. -
dump
-