|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.apache.mina.util.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 ByteBuffer s
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 List
public 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 List
public boolean isEmpty()
true
if the queue is empty.
isEmpty
in interface List
public int size()
size
in interface List
public int byteSize()
ByteBuffer
s
in this queue.
ClassCastException
- if an element is not a ByteBuffer
public String toString()
public boolean add(Object o)
add
in interface List
public Object set(int idx, Object o)
set
in interface List
public void add(int idx, Object o)
add
in interface List
public Object remove(int idx)
remove
in interface List
public 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 |