|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 |
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 obj)
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 Collection
clear
in interface List
clear
in class AbstractList
public Object pop()
null
, if this queue is empty or the element is
really null
.public void push(Object obj)
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
get
in class AbstractList
public boolean isEmpty()
true
if the queue is empty.
isEmpty
in interface Collection
isEmpty
in interface List
isEmpty
in class AbstractCollection
public int size()
size
in interface Collection
size
in interface List
size
in class AbstractCollection
public String toString()
toString
in class AbstractCollection
public boolean add(Object o)
add
in interface Collection
add
in interface List
add
in class AbstractList
public Object set(int idx, Object o)
set
in interface List
set
in class AbstractList
public void add(int idx, Object o)
add
in interface List
add
in class AbstractList
public Object remove(int idx)
remove
in interface List
remove
in class AbstractList
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 |