net.sf.zig_project.gpl.common.queue
Interface GenericBlockingQueue

All Superinterfaces:
OrderedBlockingQueue, Queue
All Known Subinterfaces:
GenericQueue
All Known Implementing Classes:
LinearDispatchQueue, LinearOrderedQueue

public interface GenericBlockingQueue
extends OrderedBlockingQueue

Provides a Queue which is made up of a Collection of generic Objects.

Version:
January 20, 2005
Author:
Frank Ziglar

Method Summary
 void add(Object o)
          Adds a single Object to the Queue.
 void addSet(Enumeration e)
          Adds an entire Enumeration of elements to the Queue.
 boolean transferTo(Object o, GenericBlockingQueue q)
          Transfers an Object, if it exists, out of this Queue and into another.
 
Methods inherited from interface net.sf.zig_project.gpl.common.queue.OrderedBlockingQueue
peekNext, removeNext
 
Methods inherited from interface net.sf.zig_project.gpl.common.queue.Queue
clear, contains, elements, isEmpty, remove
 

Method Detail

add

public void add(Object o)
Adds a single Object to the Queue.

Parameters:
o - the Object to be added
Throws:
NullPointerException - if o==null and if this implementation does not support null elements within the queue

transferTo

public boolean transferTo(Object o,
                          GenericBlockingQueue q)
Transfers an Object, if it exists, out of this Queue and into another. Generally, this method is designed for priority Queues, where the main queue must promote an Object from one Queue to another.

Parameters:
o - a copy of the Object to transfer
q - the Queue to transfer the copy to
Returns:
true only if a copy was found and transfered, otherwise false if no copy was found, and no element was added to the target Queue

addSet

public void addSet(Enumeration e)
Adds an entire Enumeration of elements to the Queue.

Parameters:
e - a enumerable set of elements