|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
org.apache.mina.util.Queue
public class Queue
A unbounded circular queue.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Queue()
Construct a new, empty queue. |
|
| Method Summary | |
|---|---|
void |
add(int idx,
Object o)
|
boolean |
add(Object o)
|
int |
byteSize()
Returns the sum of the 'remaining' of all ByteBuffers
in this queue. |
int |
capacity()
Returns the capacity of this queue. |
void |
clear()
Clears this queue. |
Object |
element()
|
Object |
first()
Returns the first element of the queue. |
Object |
get(int idx)
|
boolean |
isEmpty()
Returns true if the queue is empty. |
Object |
last()
Returns the last element of the queue. |
boolean |
offer(Object o)
|
Object |
peek()
|
Object |
poll()
|
Object |
pop()
Dequeues from this queue. |
void |
push(Object item)
Enqueue into this queue. |
Object |
remove()
|
Object |
remove(int idx)
|
Object |
set(int idx,
Object o)
|
int |
size()
Returns the number of elements in the queue. |
String |
toString()
|
| Methods inherited from class java.util.AbstractList |
|---|
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, addAll, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
| Constructor Detail |
|---|
public Queue()
| Method Detail |
|---|
public int capacity()
public void clear()
clear in interface Collectionclear in interface Listclear in class AbstractListpublic Object pop()
null, if this queue is empty or the element is
really null.public void push(Object item)
public Object first()
null, if the queue is empty, or the element is
really null.public Object last()
null, if the queue is empty, or the element is
really null.public Object get(int idx)
get in interface Listget in class AbstractListpublic boolean isEmpty()
true if the queue is empty.
isEmpty in interface CollectionisEmpty in interface ListisEmpty in class AbstractCollectionpublic int size()
size in interface Collectionsize in interface Listsize in class AbstractCollectionpublic int byteSize()
ByteBuffers
in this queue.
ClassCastException - if an element is not a ByteBufferpublic String toString()
toString in class AbstractCollectionpublic boolean add(Object o)
add in interface Collectionadd in interface Listadd in class AbstractList
public Object set(int idx,
Object o)
set in interface Listset in class AbstractList
public void add(int idx,
Object o)
add in interface Listadd in class AbstractListpublic Object remove(int idx)
remove in interface Listremove in class AbstractListpublic boolean offer(Object o)
public Object poll()
public Object remove()
public Object peek()
public Object element()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||