|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tinygroup.queue.impl.QueueImpl<E>
public class QueueImpl<E>
Created by IntelliJ IDEA. User: luoguo Date: 11-3-30 Time: 下午1:37 To change this template use File | Settings | File Templates.
| Field Summary |
|---|
| Fields inherited from interface org.tinygroup.queue.Queue |
|---|
DEFAULT_QUEUE_SIZE |
| Constructor Summary | |
|---|---|
QueueImpl()
构造函数 |
|
QueueImpl(int size)
构造函数 |
|
QueueImpl(String name)
构造函数 |
|
QueueImpl(String name,
int size)
构造函数 |
|
| Method Summary | |
|---|---|
E |
element()
获取队列头元素 |
int |
getIdleSize()
获取空闲队列长度 |
String |
getName()
获取队列名称 |
int |
getSize()
获取队列长度 |
int |
getUsingSize()
获取已用队列长度 |
boolean |
isEmpty()
检查队列是否为空 |
boolean |
isFull()
检查队列是否为满 |
void |
offer(E o)
添加元素到队列中 |
E |
peek()
获取队列头元素 |
E |
poll()
元素出队,并删除 返回所删除的元素 |
E |
remove()
元素出队,并删除 返回所删除的元素 |
void |
setName(String name)
设置队列名称 |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueueImpl()
public QueueImpl(String name)
name -
public QueueImpl(String name,
int size)
name - size - public QueueImpl(int size)
size - | Method Detail |
|---|
public void offer(E o)
offer in interface Queue<E>o - public E poll()
poll in interface Queue<E>public E remove()
remove in interface Queue<E>public E peek()
peek in interface Queue<E>public E element()
element in interface Queue<E>public boolean isEmpty()
isEmpty in interface Queue<E>public boolean isFull()
isFull in interface Queue<E>public void setName(String name)
name - public String getName()
getName in interface QueueMonitorpublic int getSize()
getSize in interface QueueMonitorpublic int getUsingSize()
getUsingSize in interface QueueMonitorpublic int getIdleSize()
getIdleSize in interface QueueMonitorpublic int size()
size in interface Queue<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||