Пример #1
0
 public synchronized LinkedHashMap<String, Float> getOptions(String opsetName) {
   LinkedHashMap<String, Float> options = new LinkedHashMap<String, Float>();
   Iterator<Option> iter = opsetList.get(opsetName).getOpt().iterator();
   while (iter.hasNext()) {
     Option opt = iter.next();
     options.put(opt.getName(), opt.getPrice());
   }
   return options;
 }
Пример #2
0
 public synchronized void setOptionValues(String opsetName, String name, float price) {
   Option opt = new Option();
   opt.setName(name);
   opt.setPrice(price);
   this.opsetList.get(opsetName).getOpt().add(opt);
 }