|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cementj.collect.Queue
public class Queue
A classic implementation of a queue. The JDK provides an implementation of a Stack, but not a queue. This queue also allows the prioritization of queue contents.
Copyright: Delta Vortex Technologies, 2002.
Field Summary | |
---|---|
static int |
MAX_PRIORITY
|
static int |
MIN_PRIORITY
|
static int |
NORM_PRIORITY
|
Constructor Summary | |
---|---|
Queue()
|
|
Queue(java.util.Collection c)
|
|
Queue(int initialCapacity)
|
Method Summary | |
---|---|
boolean |
empty()
Tests if Queue is empty. |
java.lang.Object |
peek()
Provides the next object on the Queue without removing it. |
java.lang.Object |
pop()
Removes the next object on the Queue and provides it to the caller. |
java.lang.Object |
push(java.lang.Object obj)
Adds an object to the Queue |
java.lang.Object |
push(java.lang.Object obj,
int priority)
Adds an object to the Queue |
int |
size()
Provides size of Queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NORM_PRIORITY
public static final int MIN_PRIORITY
public static final int MAX_PRIORITY
Constructor Detail |
---|
public Queue()
public Queue(java.util.Collection c)
public Queue(int initialCapacity)
Method Detail |
---|
public boolean empty()
public int size()
public java.lang.Object peek()
public java.lang.Object push(java.lang.Object obj)
public java.lang.Object push(java.lang.Object obj, int priority)
public java.lang.Object pop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |