|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.core.Queue
Class representing a FIFO queue.
Constructor Summary | |
Queue()
|
Method Summary | |
boolean |
empty()
Checks if queue is empty. |
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. |
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()
java.lang.RuntimeException
- if the queue is emptypublic java.lang.Object peek()
java.lang.RuntimeException
- if the queue is emptypublic boolean empty()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public 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 |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London