public final class TimeServerLinked extends java.util.Observable implements TimeServer
Modifier and Type | Class and Description |
---|---|
private static class |
TimeServerLinked.Node |
Modifier and Type | Field and Description |
---|---|
private double |
currentTime |
private TimeServerLinked.Node |
head |
private int |
size |
Constructor and Description |
---|
TimeServerLinked() |
Modifier and Type | Method and Description |
---|---|
double |
currentTime() |
(package private) Agent |
dequeue() |
(package private) boolean |
empty() |
void |
enqueue(double waketime,
Agent agent) |
void |
run(double duration) |
(package private) int |
size() |
java.lang.String |
toString() |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addObserver, deleteObserver
private double currentTime
private int size
private TimeServerLinked.Node head
public TimeServerLinked()
public java.lang.String toString()
toString
in class java.lang.Object
public double currentTime()
currentTime
in interface TimeServer
public void enqueue(double waketime, Agent agent) throws java.lang.IllegalArgumentException
enqueue
in interface TimeServer
java.lang.IllegalArgumentException
int size()
boolean empty()
public void run(double duration)
run
in interface TimeServer