]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/types/Pizza.java
GroupAgent now handles Group creation and run-Group-as-Thread as expected
[pub/jan/sbc.git] / src / main / java / at / ac / tuwien / sbc / valesriegler / types / Pizza.java
1 package at.ac.tuwien.sbc.valesriegler.types;
2
3 import java.io.Serializable;
4
5 import at.ac.tuwien.sbc.valesriegler.cook.Cook;
6 import at.ac.tuwien.sbc.valesriegler.waiter.Waiter;
7
8 public class Pizza implements Serializable {
9         final private PizzaType type;
10
11         // debugzeugs
12         private static int nextID = 0;
13         final private int id;
14         final public int cookId;
15         public Waiter deliveryAgent;
16
17         // private Person consumer;
18
19         public Pizza(PizzaType type, Cook producer) {
20                 id = ++nextID;
21                 this.type = type;
22                 cookId = producer.getId();
23         }
24
25         @Override
26         public String toString() {
27                 return "Pizza [type=" + type + ", id=" + id + ", cookId=" + cookId + ", deliveryAgent=" + deliveryAgent + "]";
28         }
29
30 }