net.sf.jbaobab.expirable
Class ExpirableQueue<E>
java.lang.Object
net.sf.jbaobab.expirable.AbstractExpirableCollection<E>
net.sf.jbaobab.expirable.ExpirableCollection<E>
net.sf.jbaobab.expirable.ExpirableQueue<E>
- All Implemented Interfaces:
- Iterable<E>, Collection<E>, Queue<E>
- Direct Known Subclasses:
- ExpirableBlockingQueue
public class ExpirableQueue<E>
- extends ExpirableCollection<E>
- implements Queue<E>
An expirable decorator for a Queue.
- Author:
- Oakyoon Cha
| Methods inherited from class net.sf.jbaobab.expirable.ExpirableCollection |
add, add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
ExpirableQueue
public ExpirableQueue(Queue<E> queue,
long timeout)
ExpirableQueue
public ExpirableQueue(Queue<E> queue)
offer
public boolean offer(E element)
- Specified by:
offer in interface Queue<E>
poll
public E poll()
- Specified by:
poll in interface Queue<E>
remove
public E remove()
- Specified by:
remove in interface Queue<E>
peek
public E peek()
- Specified by:
peek in interface Queue<E>
element
public E element()
- Specified by:
element in interface Queue<E>