|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.Queue
public class Queue
Class representing a FIFO queue.
| Constructor Summary | |
|---|---|
Queue()
|
|
| Method Summary | |
|---|---|
boolean |
empty()
Checks if queue is empty. |
java.lang.String |
getRevision()
Returns the revision string. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.Object |
peek()
Gets object from the front of the queue. |
java.lang.Object |
pop()
Pops an object from the front of the queue. |
java.lang.Object |
push(java.lang.Object item)
Appends an object to the back of the queue. |
void |
removeAllElements()
Removes all objects from the queue m_Tail.m_Next. |
int |
size()
Gets queue's size. |
java.lang.String |
toString()
Produces textual description of queue. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Queue()
| Method Detail |
|---|
public final void removeAllElements()
public java.lang.Object push(java.lang.Object item)
item - the object to be appended
public java.lang.Object pop()
throws java.lang.RuntimeException
java.lang.RuntimeException - if the queue is empty
public java.lang.Object peek()
throws java.lang.RuntimeException
java.lang.RuntimeException - if the queue is emptypublic boolean empty()
public int size()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlerpublic static void main(java.lang.String[] argv)
argv - a set of strings that are pushed on a test queue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||