javautils.dispensers
Class Queue

java.lang.Object
  |
  +--javautils.dispensers.AbstractDispenser
        |
        +--javautils.dispensers.Queue
All Implemented Interfaces:
Dispenser

public class Queue
extends AbstractDispenser

FIFO queue.


Constructor Summary
Queue()
           
Queue(java.util.Collection c)
           
 
Method Summary
 java.lang.Object pop()
          Chooses the next element to be processed, removes it from the dispenser, and returns the element.
 void push(java.lang.Object element)
          Adds a new element into the dispenser.
 int size()
          Number of elements in the dispenser.
 
Methods inherited from class javautils.dispensers.AbstractDispenser
isEmpty, notEmpty, pushAll, pushAll, pushAllRight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Queue

public Queue()

Queue

public Queue(java.util.Collection c)
Method Detail

size

public int size()
Description copied from interface: Dispenser

Number of elements in the dispenser.


pop

public java.lang.Object pop()
Description copied from interface: Dispenser

Chooses the next element to be processed, removes it from the dispenser, and returns the element.


push

public void push(java.lang.Object element)
Description copied from interface: Dispenser

Adds a new element into the dispenser.