Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
C
D
E
F
G
J
M
N
P
Q
R
S
T
C
compareTo(Object)
- Method in class
Event
D
DelayedPrintJob
- class
DelayedPrintJob
.
Represents when a print job that has been delayed should actually start printing.
DelayedPrintJob(int, StartPrintJob)
- Constructor for class
DelayedPrintJob
Creates a event signalling that a job has been delayed for some time but should now start printing.
dequeue()
- Method in class
MyQueue
Removes an element from the front of this queue and returns it.
dequeue()
- Method in interface
Queue
E
empty()
- Method in class
MyQueue
Returns whether this queue is empty.
empty()
- Method in interface
Queue
EndPrintJob
- class
EndPrintJob
.
An Event that indicates when a printer will stop printing a certain job.
EndPrintJob(int, StartPrintJob)
- Constructor for class
EndPrintJob
Creates a new EndPrintJob
EndSimulation
- class
EndSimulation
.
An event that indicates that a running simulation should end.
EndSimulation(int)
- Constructor for class
EndSimulation
enqueue(Object)
- Method in class
MyPriorityQueue
Adds a given element to this priority queue.
enqueue(Object)
- Method in class
MyQueue
Adds the given object to the end of this queue.
enqueue(Object)
- Method in interface
Queue
equals(Object)
- Method in class
Event
Two objects are equal if they have the same time.
Event
- class
Event
.
Represents an occurance within a single instant in time.
Event(int)
- Constructor for class
Event
Creates a new event that occurs at the given time.
EventSimulation
- class
EventSimulation
.
Runs an event-driven simulation of a printer being used and generates statistics concerning the printer's performance.
EventSimulation(Printer, int, int, int, int, int)
- Constructor for class
EventSimulation
Creates a new simulation to run.
F
front()
- Method in class
MyQueue
Returns the element currently stored at the front of this queue, but does not remove that element.
front()
- Method in interface
Queue
G
getNext()
- Method in class
Node
Returns the next node in a list after this node.
getOriginalJob()
- Method in class
DelayedPrintJob
Returns the original print job that had been delayed until this event.
getPages()
- Method in class
StartPrintJob
Returns how many pages should be printed for this print job.
getPrintTime(int)
- Method in class
Printer
Returns how long it will take to print the given number of pages, but does not actually print them.
getStart()
- Method in class
EndPrintJob
Returns the start event that correspends to this end event (as given to the constructor).
getTime()
- Method in class
Event
Returns the time of this event
getValue()
- Method in class
Node
Returns this node's contents.
getWait()
- Method in class
DelayedPrintJob
Returns the time difference between this delayed event and its contained "original start" event.
J
JobSimulation
- class
JobSimulation
.
Runs a simulation of a printer being used and generates statistics concerning the printer's performance.
JobSimulation(Printer, int, int, int, int, int)
- Constructor for class
JobSimulation
Creates a new simulation to run.
M
main(String[])
- Static method in class
EventSimulation
Creates a new simulation, runs it, and print the results to the screen.
main(String[])
- Static method in class
JobSimulation
Creates a new simulation, runs it, and print the results to the screen.
main(String[])
- Static method in class
PriorityQueueGrader
Runs a number of tests of a Queue, printing the expected results and actual results to the screen.
main(String[])
- Static method in class
QueueGrader
Runs a number of tests of a Queue, printing the expected results and actual results to the screen.
MyPriorityQueue
- class
MyPriorityQueue
.
A queue that places new entries in order within the queue, rather than at the end.
MyPriorityQueue()
- Constructor for class
MyPriorityQueue
MyQueue
- class
MyQueue
.
An implementation of a Queue.
MyQueue()
- Constructor for class
MyQueue
N
Node
- class
Node
.
A singly-linked Node.
Node(Object)
- Constructor for class
Node
Creates a new Node with no links.
Node(Object, Node)
- Constructor for class
Node
Create a new node with the given contents and link to another (next) node.
P
print(int)
- Method in class
Printer
Tells this printer to simulate printing a print job.
Printer
- class
Printer
.
Represents a printer in a simulation.
Printer(int, int)
- Constructor for class
Printer
Creates a new printer
printStatistics()
- Method in class
EventSimulation
Prints the accumulated statistics for this simulation and its printer to the screen.
printStatistics()
- Method in class
JobSimulation
Prints the accumulated statistics for this simulation and its printer to the screen.
PriorityQueueGrader
- class
PriorityQueueGrader
.
Tests an implementation of a Queue for correctness.
PriorityQueueGrader()
- Constructor for class
PriorityQueueGrader
Q
Queue
- interface
Queue
.
QueueEmptyException
- exception
QueueEmptyException
.
Thrown when trying to access or mutate the elements of an empty queue.
QueueEmptyException()
- Constructor for class
QueueEmptyException
QueueFullException
- exception
QueueFullException
.
Thrown when an element is added to a queue that has already reached its maximum capacity (if any).
QueueFullException()
- Constructor for class
QueueFullException
QueueGrader
- class
QueueGrader
.
Tests an implementation of a Queue for correctness.
QueueGrader()
- Constructor for class
QueueGrader
R
reset()
- Method in class
Printer
Resets this printer, setting all statistics to zero.
run()
- Method in class
EventSimulation
Runs this printer simulation.
run()
- Method in class
JobSimulation
Runs this printer simulation.
S
setNext(Node)
- Method in class
Node
Set this node's next reference to the given node.
setValue(Object)
- Method in class
Node
Sets this node to contain the given value
SimulationHiccupException
- exception
SimulationHiccupException
.
A runtime exception indicating that a simulation has managed to get itself in an illegal state or has tried to process something it doesn't understand.
SimulationHiccupException()
- Constructor for class
SimulationHiccupException
SimulationHiccupException(String)
- Constructor for class
SimulationHiccupException
StartPrintJob
- class
StartPrintJob
.
An event that indicates a printer should start printing.
StartPrintJob(int, int)
- Constructor for class
StartPrintJob
Creates a new StartPrintJob with the specified time and number of pages to be printed.
T
tail
- Variable in class
MyQueue
time
- Variable in class
Event
toString()
- Method in class
Event
Returns a string containing this event's class name and its time.
toString()
- Method in class
EventSimulation
Provides a snapshot of the current simulation, including the current job and front parts of the event queue and delayed jobs queue.
toString()
- Method in class
JobSimulation
Provides a snapshot of the current simulation, including the current time and next job.
toString()
- Method in class
MyQueue
Returns a String representation of this queue, with the top as the first item in the list.
toString()
- Method in class
Node
Returns a String representation of this node, including the value contained, as well as the value of the next node (if any).
toString()
- Method in class
Printer
Returns the settings and statistics of this printer.
C
D
E
F
G
J
M
N
P
Q
R
S
T
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES