|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectWaitingLine
public class WaitingLine
Class for simulation FIFO waiting line (queue). A waiting
line has two associated statistics, a WeightedStatistic
for line length, and a Statistic for waiting time.
COMP 2100
Project 3
October 2014
Constructor Summary | |
---|---|
WaitingLine(java.lang.String name)
Creates new WaitingLine that is empty. |
Method Summary | |
---|---|
void |
enter(Customer c)
Place customer into the line. |
Statistic |
getLineLengthStat()
Retrieve WeightedStatistic for line length |
java.lang.String |
getName()
Retrieve name given to this waiting line |
Statistic |
getWaitTimeStat()
Retrieve Statistic for waiting time |
boolean |
isEmpty()
Reports whether any customers are waiting in line |
Customer |
leave()
Removes a customer from the front of the line |
int |
length()
Determine how many customers are waiting in line |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WaitingLine(java.lang.String name)
name
- Descriptive name for this lineMethod Detail |
---|
public boolean isEmpty()
public int length()
public java.lang.String getName()
public Statistic getWaitTimeStat()
public Statistic getLineLengthStat()
public void enter(Customer c)
c
- the customerpublic Customer leave()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |