This queue exists to provide validation for the decorated queue. It is normally created to decorate an empty queue. If an object cannot be added to the queue, an IllegalArgumentException is thrown.
One usage would be to ensure that no null entries are added to the queue.
Queue queue = PredicatedQueue.predicatedQueue(new UnboundedFifoQueue(), NotNullPredicate.INSTANCE);@since 4.0 @version $Id: PredicatedQueue.java 1477765 2013-04-30 18:37:37Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|