public interface ISharedStack<T> extends ReifiedIterable<T>, IShared
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the stack
|
T |
get()
Pops an object, blocking if none is 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)
Pushes an object
|
void |
putRange(java.lang.Iterable<? extends T> items)
Pushes 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
- When the argument is out of range.T peek()
void put(T item)
void putRange(java.lang.Iterable<? extends T> items)
java.lang.NullPointerException
- When the items argument is null.int size()
T[] toArray()
ReifiedList<T> toList()