public class IntQueue
extends java.lang.Object
but improved to hold k elements in an array of length k, not k-1.
Modifier and Type | Field and Description |
---|---|
protected int[] |
array |
protected int |
back |
protected boolean |
extendable |
protected int |
front |
static int |
INITIAL_SIZE |
protected int |
size |
Constructor and Description |
---|
IntQueue() |
IntQueue(int initialSize) |
IntQueue(int initialSize,
boolean extendable) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
int |
dequeue() |
void |
enqueue(int e) |
java.util.Iterator |
iterator() |
int |
size() |
java.lang.String |
toString() |
protected int[] array
protected int front
protected int back
protected int size
public static final int INITIAL_SIZE
protected boolean extendable