Package tigase.collections
Class CircularFifoQueue<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- tigase.collections.CircularFifoQueue<E>
-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Queue<E>
public class CircularFifoQueue<E> extends AbstractQueue<E>
-
-
Constructor Summary
Constructors Constructor Description CircularFifoQueue(int maxEntries, Consumer<E> overflowConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(Collection<? extends E> c)Iterator<E>iterator()intlimit()booleanoffer(E element)Epeek()Epoll()booleansetLimit(int limit)intsize()-
Methods inherited from class java.util.AbstractQueue
clear, element, remove
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
-
-
-
Method Detail
-
add
public boolean add(E e)
- Specified by:
addin interfaceCollection<E>- Specified by:
addin interfaceQueue<E>- Overrides:
addin classAbstractQueue<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAllin interfaceCollection<E>- Overrides:
addAllin classAbstractQueue<E>
-
iterator
public Iterator<E> iterator()
- Specified by:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>- Specified by:
iteratorin classAbstractCollection<E>
-
limit
public int limit()
-
offer
public boolean offer(E element)
-
peek
public E peek()
-
poll
public E poll()
-
setLimit
public boolean setLimit(int limit)
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein classAbstractCollection<E>
-
-