public class Queue
extends java.util.AbstractList
implements java.util.List, java.io.Serializable
Constructor and Description |
---|
Queue()
Construct a new, empty queue.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int idx,
java.lang.Object o) |
boolean |
add(java.lang.Object o) |
int |
capacity()
Returns the capacity of this queue.
|
void |
clear()
Clears this queue.
|
java.lang.Object |
element() |
java.lang.Object |
first()
Returns the first element of the queue.
|
java.lang.Object |
get(int idx) |
boolean |
isEmpty()
Returns
true if the queue is empty. |
java.lang.Object |
last()
Returns the last element of the queue.
|
boolean |
offer(java.lang.Object o) |
java.lang.Object |
peek() |
java.lang.Object |
poll() |
java.lang.Object |
pop()
Dequeues from this queue.
|
void |
push(java.lang.Object item)
Enqueue into this queue.
|
java.lang.Object |
remove() |
java.lang.Object |
remove(int idx) |
java.lang.Object |
set(int idx,
java.lang.Object o) |
int |
size()
Returns the number of elements in the queue.
|
java.lang.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
public int capacity()
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class java.util.AbstractList
public java.lang.Object pop()
null
, if this queue is empty or the element is
really null
.public void push(java.lang.Object item)
public java.lang.Object first()
null
, if the queue is empty, or the element is
really null
.public java.lang.Object last()
null
, if the queue is empty, or the element is
really null
.public java.lang.Object get(int idx)
get
in interface java.util.List
get
in class java.util.AbstractList
public boolean isEmpty()
true
if the queue is empty.isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
isEmpty
in class java.util.AbstractCollection
public int size()
size
in interface java.util.Collection
size
in interface java.util.List
size
in class java.util.AbstractCollection
public java.lang.String toString()
toString
in class java.util.AbstractCollection
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.List
add
in class java.util.AbstractList
public java.lang.Object set(int idx, java.lang.Object o)
set
in interface java.util.List
set
in class java.util.AbstractList
public void add(int idx, java.lang.Object o)
add
in interface java.util.List
add
in class java.util.AbstractList
public java.lang.Object remove(int idx)
remove
in interface java.util.List
remove
in class java.util.AbstractList
public boolean offer(java.lang.Object o)
public java.lang.Object poll()
public java.lang.Object remove()
public java.lang.Object peek()
public java.lang.Object element()
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.