code: public static IndexedContainer buildContainerFromMap(String captionProperty, Map<String, String> map) {
  
          IndexedContainer container = new IndexedContainer();
          for (Map.Entry<String, String> entry : map.entrySet()) {
              container.addItem(entry.getKey()).getItemProperty(captionProperty).setValue(entry.getValue());
          }
          return container;
      }
docs: Builds a container for use in combo boxes from a map of key/value pairs, where the keys are options and the values are captions.<p>
  
  @param captionProperty the property name to use for captions
  @param map the map
  @return the new container