public interface Queue<T>
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Get the queue capacity.
|
void |
clear()
Set all elements free.
|
QueueElement<T> |
getFree()
Get the next free element.
|
int |
getNumberFree()
Get the number of free queue elements.
|
QueueElement<T> |
getUsed()
Get the oldest used element.
|
void |
releaseUsed(QueueElement<T> queueElement)
Release the getUsed structure.
|
void |
setUsed(QueueElement<T> queueElement)
Set the getFree element to used;
|
void clear()
int getNumberFree()
int capacity()
QueueElement<T> getFree()
void setUsed(QueueElement<T> queueElement)
queueElement
- The queueElement, which must be the
element returned by the oldest call to getFree that was not setUsed.IllegalStateException
- if queueElement is not the element
returned by the oldest call to getFree that was not setUsed.QueueElement<T> getUsed()
void releaseUsed(QueueElement<T> queueElement)
queueElement
- The queueElement, which must be the
element returned by the most recent call to getUsed.IllegalStateException
- if queueElement is not the element
returned by the most recent call to getUsed.Copyright © 2014. All Rights Reserved.