Code example for ImmutableMultimap.Builder

Methods: build

0
 
   private final Builder<IdAndName, String> regions = ImmutableMultimap.<IdAndName, String> builder();
 
   @Override 
   public Multimap<IdAndName, String> getResult() {
      return regions.build();
   } 
 
   @Override 
   public void startElement(String url, String name, String qName, Attributes attrs) {
      if (equalsOrSuffix(qName, "Region")) {
         Map<String, String> attributes = cleanseAttributes(attrs);
         IdAndName region = IdAndName.create(attributes.get("RegionID"), attributes.get("RegionName"));
         regions.putAll(region, Splitter.on(';').split(attributes.get("TerritoryName")));
      } 
   } 
} 
Contextual code suggestions in your IDE  Get Codota for Java