Queue Class
A simple FIFO queue. Items are added to the Queue with add(1..n items) and removed using next().
Constructor
Queue
    
        
            (
    
    
    
    
    
    
    
    
    
    - 
                    
                        
item 
Parameters:
- 
                    
                        
itemMIXED multiple0..n items to seed the queue.
 
Methods
_init
    
        ()
    
    
    
    
        protected
    
    
    
    
    
    
    Initialize the queue
add
    
        
            (
    
    
        
            Object
        
    
    
    
    
    
    
    
    
    - 
                    
                        
item 
Add 0..n items to the end of the queue.
Parameters:
- 
                    
                        
itemMIXED multiple0..n items.
 
Returns:
                
                    
                        Object:
                    
                    
        this queue.
indexOf
    
        
            (
    
    
        
            Number
        
    
    
    
    
    
    
    
    
    - 
                    
                        
needle 
Returns the current index in the queue of the specified item
Parameters:
- 
                    
                        
needleMIXEDthe item to search for
 
Returns:
                
                    
                        Number:
                    
                    
        the index of the item or -1 if not found
last
    
        ()
    
    
        
            MIXED
        
    
    
    
    
    
    
    
    
    Get the last in the queue. LIFO support.
Returns:
                
                    
                        MIXED:
                    
                    
        the last item in the queue.
next
    
        ()
    
    
        
            MIXED
        
    
    
    
    
    
    
    
    
    Get the next item in the queue. FIFO support
Returns:
                
                    
                        MIXED:
                    
                    
        the next item in the queue.
promote
    
        
            (
    
    
    
    
    
    
    
    
    
    - 
                    
                        
item 
Moves the referenced item to the head of the queue
Parameters:
- 
                    
                        
itemMIXEDan item in the queue
 
remove
    
        
            (
    
    
    
    
    
    
    
    
    
    - 
                    
                        
item 
Removes the referenced item from the queue
Parameters:
- 
                    
                        
itemMIXEDan item in the queue
 
