JBoss Threads 2.0.0.GA-redhat-2

org.jboss.threads
Class ArrayQueue<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by 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.


Constructor Summary
ArrayQueue(int capacity)
           
 
Method Summary
 void clear()
           
 boolean isEmpty()
           
 Iterator<E> iterator()
           
 boolean offer(E e)
           
 E peek()
           
 E poll()
           
 int size()
           
 
Methods inherited from class java.util.AbstractQueue
add, addAll, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, 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.Queue
add, element, remove
 
Methods inherited from interface java.util.Collection
addAll, contains, containsAll, equals, hashCode, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ArrayQueue

public ArrayQueue(int capacity)
Method Detail

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>

JBoss Threads 2.0.0.GA-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.