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