@InterfaceAudience.Private public class BoundedArrayQueue<E> extends AbstractQueue<E>
Queue
.Modifier and Type | Field and Description |
---|---|
private int |
count |
private Object[] |
items |
private int |
putIndex |
private int |
takeIndex |
Constructor and Description |
---|
BoundedArrayQueue(int maxElements) |
Modifier and Type | Method and Description |
---|---|
private E |
dequeue() |
Iterator<E> |
iterator()
Not implemented and will throw
UnsupportedOperationException |
boolean |
offer(E e) |
E |
peek() |
E |
poll() |
int |
size() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
private Object[] items
private int takeIndex
private int putIndex
private int count
public int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>
public Iterator<E> iterator()
UnsupportedOperationException
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in class AbstractCollection<E>
public boolean offer(E e)
public E poll()
private E dequeue()
public E peek()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.