Class ArrayQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
org.jboss.threads.ArrayQueue<E>
- All Implemented Interfaces:
Iterable<E>, Collection<E>, Queue<E>
A simple array-backed queue with a fixed size.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractQueue
add, addAll, element, removeMethods inherited from class AbstractCollection
contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collection
addAll, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
ArrayQueue
public ArrayQueue(int capacity)
-
-
Method Details
-
iterator
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>- Overrides:
isEmptyin classAbstractCollection<E>
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein classAbstractCollection<E>
-
offer
-
poll
-
peek
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>- Overrides:
clearin classAbstractQueue<E>
-