public class Queue extends Vector
capacityIncrement, elementCount, elementData
modCount
Constructor and Description |
---|
Queue()
Creates a new Queue of the default size.
|
Queue(int size)
Creates a new queue of the specified size.
|
Modifier and Type | Method and Description |
---|---|
int |
getMode()
Get the value of mode.
|
Object |
peek()
Look at the first object in the queue without removing it.
|
Object |
pop()
Pop an object off of the queue.
|
void |
push(Object obj)
Push an object onto the queue.
|
void |
setMode(int mode)
Set the value of mode.
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
public Queue()
public Queue(int size)
size
- the size of this queuepublic void push(Object obj)
obj
- the objectpublic Object peek()
public Object pop()
public int getMode()
public void setMode(int mode)
mode
- Value to assign to mode.