org.jboss.threads
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>
public final class ArrayQueue<E>
- extends AbstractQueue<E>
- implements Queue<E>
A simple array-backed queue with a fixed size.
ArrayQueue
public ArrayQueue(int capacity)
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interface Iterable<E>
- Specified by:
iterator
in interface Collection<E>
- Specified by:
iterator
in class AbstractCollection<E>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection<E>
- Overrides:
isEmpty
in class AbstractCollection<E>
size
public int size()
- Specified by:
size
in interface Collection<E>
- Specified by:
size
in class AbstractCollection<E>
offer
public boolean offer(E e)
- Specified by:
offer
in interface Queue<E>
poll
public E poll()
- Specified by:
poll
in interface Queue<E>
peek
public E peek()
- Specified by:
peek
in interface Queue<E>
clear
public void clear()
- Specified by:
clear
in interface Collection<E>
- Overrides:
clear
in class AbstractQueue<E>
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.