E
- public class CircularQueue<E> extends AbstractList<E> implements List<E>, Queue<E>, Serializable
modCount
Constructor and Description |
---|
CircularQueue()
Construct a new, empty queue.
|
CircularQueue(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
add(int idx,
E o) |
int |
capacity()
Returns the capacity of this queue.
|
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, addAll, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray
public CircularQueue()
public CircularQueue(int initialCapacity)
public 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 © 2021. All rights reserved.