com.planeth.common
Class Queue

java.lang.Object
  extended bycom.planeth.common.Queue

public class Queue
extends java.lang.Object

Implementation of a simple queue

Author:
Andreas Grässer, gal@planet-h.com
created 28.12.2005

Constructor Summary
Queue()
           
 
Method Summary
 void addItem(java.lang.Object item)
          Adds an item to the queue
 java.lang.Object currentItem()
          Returns the current item ot the queue
 java.lang.Object nextItem()
          Returns the next item ot the queue
 void setCirculating(boolean circulating)
          If the circulating is set to true, the items will not be deleted after getting them with nextItem (they gonna move to the end of the queue)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Queue

public Queue()
Method Detail

addItem

public void addItem(java.lang.Object item)
Adds an item to the queue

Parameters:
item -

nextItem

public java.lang.Object nextItem()
Returns the next item ot the queue

Returns:
returns the next item ot the queue

currentItem

public java.lang.Object currentItem()
Returns the current item ot the queue

Returns:
returns the current item ot the queue

setCirculating

public void setCirculating(boolean circulating)
If the circulating is set to true, the items will not be deleted after getting them with nextItem (they gonna move to the end of the queue)

Parameters:
circulating - The circulating to set.