E
- The type of elements stored inthe queuepublic class CircularQueue<E> extends AbstractList<E> implements Queue<E>, Serializable
modCount
Constructor and Description |
---|
CircularQueue()
Construct a new, empty, circular queue.
|
CircularQueue(int initialCapacity)
Construct a new circular queue with an initial capacity.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
add(int idx,
E o) |
int |
capacity() |
void |
clear() |
E |
element() |
E |
get(int idx) |
boolean |
isEmpty() |
boolean |
offer(E item) |
E |
peek() |
E |
poll() |
E |
remove() |
E |
remove(int idx) |
E |
set(int idx,
E o) |
int |
size() |
String |
toString() |
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, equals, hashCode, iterator, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
addAll, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
public CircularQueue()
public CircularQueue(int initialCapacity)
initialCapacity
- The initial capacity of this circular queuepublic int capacity()
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class AbstractList<E>
public E get(int idx)
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface List<E>
isEmpty
in class AbstractCollection<E>
public int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public String toString()
toString
in class AbstractCollection<E>
public boolean add(E o)
public void add(int idx, E o)
public E remove(int idx)
Copyright © 2004–2018 Apache MINA Project. All rights reserved.