T
- The component type of the queue.public interface ISharedQueue<T> extends ReifiedIterable<T>, IShared
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the queue
|
T |
get()
Dequeues an object, otherwise blocks until one becomes available.
|
java.lang.Iterable<T> |
getRange(int count)
Dequeues a number of objects, blocking if not all are available.
|
T |
peek()
Returns the next element without removing it.
|
void |
put(T item)
En-queues an object
|
void |
putRange(java.lang.Iterable<? extends T> items)
En-queues a number of objects
|
int |
size()
Returns the queue length
|
T[] |
toArray()
Puts all elements in an array and returns them.
|
ReifiedList<T> |
toList()
Puts all elements in a list and returns them.
|
getGenericTypeParameter
void clear()
T get()
java.lang.Iterable<T> getRange(int count)
java.lang.IllegalArgumentException
- The count is out of range.T peek()
java.util.NoSuchElementException
- When the queue is empty.void put(T item)
void putRange(java.lang.Iterable<? extends T> items)
java.lang.NullPointerException
- When the argument is null.int size()
T[] toArray()
ReifiedList<T> toList()