public class QueueInt extends Object
| Constructor and Description |
|---|
QueueInt(int capacity)
Create a queue of specified initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
int |
get()
Retrieve the next element from the queue.
|
void |
put(int x)
Add an element to the back of the queue.
|
int |
size()
The number of elements available for retrieval.
|
public QueueInt(int capacity)
capacity - the initial capacitypublic final int get()
public final int size()
public final void put(int x)
x - the element to add