The Queue Class contains the following constructors:
Queue()
Queue(int initialcapacity)
Queue(int initialcapacity, int growthfactor)
Constructs a queue with an initial capacity of 32 elements. When the queue is full, its size doubles.
public Queue();
Constructs a queue with the given initial capacity. When the queue is full, the capacity doubles in size.
public Queue(int initialcapacity);
initialcapacity | The size of the queue to construct (the number of elements it will hold). |
Constructs a queue with the given initial capacity and growth factor.
public Queue(int initialcapacity, int growthfactor);
initialcapacity | The initial size of the queue. |
growthfactor | The factor to grow by when the queue is full. If the growth factor is 1, the queue will drop elements at its head as needed. |