Code example for ImmutableMap.Builder

Methods: build

0
   private String name;
 
   @Override 
   public Map<String, String> getResult() {
      try { 
         return builder.build();
      } catch (NullPointerException e) {
         return null; 
      } finally { 
         builder = ImmutableMap.<String, String> builder();
      } 
   } 
 
   @Override 
   public void endElement(String uri, String name, String qName) {
      if (qName.equals("Name")) {
         this.name = currentOrNull(currentText);
      } else if (qName.equals("Value")) {
         builder.put(this.name, currentOrNull(currentText));
         this.name = null;
Contextual code suggestions in your IDE  Get Codota for Java