]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/group/DeliveryGroup.java
[XVSM] Some GroupAgent Container Refactoring. Full Driver<->DeliveryCustomer communic...
[pub/jan/sbc.git] / src / main / java / at / ac / tuwien / sbc / valesriegler / group / DeliveryGroup.java
1 package at.ac.tuwien.sbc.valesriegler.group;
2
3
4 import at.ac.tuwien.sbc.valesriegler.common.HasId;
5 import at.ac.tuwien.sbc.valesriegler.types.DeliveryGroupData;
6 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory;
8
9 public class DeliveryGroup implements Runnable, HasId {
10     private static final Logger log = LoggerFactory.getLogger(DeliveryGroup.class);
11     private static int idNext = 0;
12
13     private DeliveryGroupData deliveryGroupData;
14
15     public DeliveryGroup() {
16         this.deliveryGroupData = new DeliveryGroupData(++idNext);
17     }
18
19     public DeliveryGroup(int id) {
20         this.deliveryGroupData = new DeliveryGroupData(id);
21     }
22
23     public DeliveryGroupData getDeliveryGroupData() {
24         return deliveryGroupData;
25     }
26
27     @Override
28     public int getId() {
29         return deliveryGroupData.getId();
30     }
31
32     public void setDeliveryGroupData(DeliveryGroupData deliveryGroupData) {
33         this.deliveryGroupData = deliveryGroupData;
34     }
35
36     @Override
37     public void run() {
38           //@jan you can use that like in at.ac.tuwien.sbc.valesriegler.group.Group if you need to...
39     }
40 }