|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproject4.OrderList
public abstract class OrderList
Nested Class Summary | |
---|---|
class |
OrderList.NoOrderException
throw this exception when there is no order to cook |
class |
OrderList.UnAcceptanceOrderException
throw this exception if the order could not be accepted |
Field Summary | |
---|---|
static int |
MAX_DIST
|
static int |
MAX_SEATS
|
Constructor Summary | |
---|---|
OrderList()
|
Method Summary | |
---|---|
abstract void |
addOrder(Order order,
int orderType,
int dist,
int seats)
add an order to the order list |
int |
getMaxDist()
|
int |
getMaxSeats()
|
abstract Order |
getOrder(int idx)
get an order to the order list |
abstract Order[] |
getOrderList()
get the current order list |
abstract boolean |
isEmpty()
determines if the order list is empty or not |
abstract Order |
removeOrder(int idx)
remove an order to the order list |
void |
setMaxDist(int maxDist)
Set maximum distance for a delivered order |
void |
setMaxSeats(int maxSeats)
Set the maximum number of seats in the restaurant |
abstract int |
size()
return the number of orders currently in the list |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_DIST
public static final int MAX_SEATS
Constructor Detail |
---|
public OrderList()
Method Detail |
---|
public int getMaxDist()
public void setMaxDist(int maxDist)
maxDist
- public int getMaxSeats()
public void setMaxSeats(int maxSeats)
maxSeats
- public abstract void addOrder(Order order, int orderType, int dist, int seats) throws OrderList.UnAcceptanceOrderException
order
- the order to add to the list
FullOrdersException
- throw this when there is no more space on
the order list
OrderList.UnAcceptanceOrderException
public abstract Order removeOrder(int idx) throws ILinkedList.OrderIndexOutOfBoundsException
idx
- the index in the list of the order to remove
ILinkedList.OrderIndexOutOfBoundsException
- throw this when the index is
not validpublic abstract Order getOrder(int idx) throws ILinkedList.OrderIndexOutOfBoundsException
idx
- the index in the list of the order to get
ILinkedList.OrderIndexOutOfBoundsException
- throw this when the index is
not validpublic abstract int size()
public abstract boolean isEmpty()
public abstract Order[] getOrderList() throws OrderList.NoOrderException
OrderList.NoOrderException
- throw this when there is no order in the list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |