cork.util
Interface Queue

All Known Implementing Classes:
BlockingQueue

public interface Queue

All queue's must implement this interface, regardless of type.

Version:
0.1 Revision 0;

Method Summary
 void add(java.lang.Object object)
          Adds and object to the queue.
 void clear()
          Clears the queue of all object it is holding.
 java.lang.Object next()
          Returns the next object in the queue, removing it in the process.
 java.lang.Object peek()
          Returns the next object in the queue without removing it in the process.
 int size()
          Returns the number of elements currently in the queue.
 void skip()
          Skips the next object in the queue, removing it in the process.
 

Method Detail

add

public void add(java.lang.Object object)
Adds and object to the queue. The order that objects are added is implementation dependant.
Returns:
java.lang.Object

clear

public void clear()
Clears the queue of all object it is holding.

next

public java.lang.Object next()
Returns the next object in the queue, removing it in the process. The order that objects are returned is implementation dependant.
Returns:
java.lang.Object
See Also:
Queue.peek()

peek

public java.lang.Object peek()
Returns the next object in the queue without removing it in the process. The order that objects are returned is implementation dependant.
Returns:
java.lang.Object
See Also:
Queue.next()

size

public int size()
Returns the number of elements currently in the queue.
Returns:
int

skip

public void skip()
Skips the next object in the queue, removing it in the process. The order that objects are skipped is implementation dependant.
Returns:
java.lang.Object
See Also:
Queue.next()