[236] | 1 | //package negotiator.onetomany;
|
---|
| 2 | //
|
---|
| 3 | //import java.util.ArrayList;
|
---|
| 4 | //import java.util.HashMap;
|
---|
| 5 | //import java.util.List;
|
---|
| 6 | //import java.util.Set;
|
---|
| 7 | //
|
---|
| 8 | ///**
|
---|
| 9 | // *
|
---|
| 10 | // *
|
---|
| 11 | // *
|
---|
| 12 | // *
|
---|
| 13 | // *
|
---|
| 14 | // * @author Faria Nassiri-Mofakham
|
---|
| 15 | // *
|
---|
| 16 | // */
|
---|
| 17 | //public class DemandPlan
|
---|
| 18 | //{
|
---|
| 19 | // private HashMap<Product, Integer> demandPlan;
|
---|
| 20 | // private HashMap<Product, Double> weight;
|
---|
| 21 | //
|
---|
| 22 | //
|
---|
| 23 | //
|
---|
| 24 | // public DemandPlan()
|
---|
[226] | 25 | // {
|
---|
[236] | 26 | // this.demandPlan = new HashMap<Product, Integer>();
|
---|
| 27 | // this.weight = new HashMap<Product, Double>();
|
---|
[226] | 28 | // }
|
---|
| 29 | //
|
---|
[236] | 30 | // public HashMap<Product, Integer> getDemandPlan()
|
---|
| 31 | // {
|
---|
| 32 | // return demandPlan;
|
---|
| 33 | // }
|
---|
[226] | 34 | //
|
---|
[236] | 35 | // public HashMap<Product, Double> getWeight()
|
---|
[226] | 36 | // {
|
---|
[236] | 37 | // return weight;
|
---|
[226] | 38 | // }
|
---|
[236] | 39 | //
|
---|
| 40 | //
|
---|
| 41 | // @Override
|
---|
| 42 | // public String toString()
|
---|
| 43 | // {
|
---|
| 44 | // return demandPlan.toString();
|
---|
| 45 | // }
|
---|
| 46 | //
|
---|
| 47 | // public void setQuantity(Product p, Integer n)
|
---|
| 48 | // {
|
---|
| 49 | // demandPlan.put(p,n);
|
---|
| 50 | // }
|
---|
| 51 | //
|
---|
| 52 | //
|
---|
| 53 | // public void setWeight(Product p, Double e)
|
---|
| 54 | // {
|
---|
| 55 | // weight.put(p,e);
|
---|
| 56 | // }
|
---|
| 57 | //
|
---|
| 58 | // public Integer getQuantity(Product p)
|
---|
| 59 | // {
|
---|
| 60 | // if (this.demandPlan.containsKey(p))
|
---|
| 61 | // return demandPlan.get(p);
|
---|
| 62 | // else
|
---|
| 63 | // return 0;
|
---|
| 64 | // }
|
---|
| 65 | //
|
---|
| 66 | // public Double getWeight(Product p)
|
---|
| 67 | // {
|
---|
| 68 | // if (this.weight.containsKey(p))
|
---|
| 69 | // return weight.get(p);
|
---|
| 70 | // else
|
---|
| 71 | // return 0.0;
|
---|
| 72 | // }
|
---|
| 73 | //
|
---|
| 74 | //// public Set<Product> getKeys()
|
---|
| 75 | //// {
|
---|
| 76 | //// return demandPlan.keySet();
|
---|
| 77 | //// }
|
---|
| 78 | ////
|
---|
| 79 | ////
|
---|
| 80 | //// public Set<Integer> getValues()
|
---|
| 81 | //// {
|
---|
| 82 | //// return (Set<Integer>) demandPlan.values();
|
---|
| 83 | //// }
|
---|
| 84 | //}
|
---|