Code example for ImmutableSet.Builder

Methods: add

0
 
   @Override 
   public void startElement(String url, String name, String qName, Attributes attrs) {
      if (equalsOrSuffix(qName, "AccountLevelGroups")) {
         Map<String, String> attributes = cleanseAttributes(attrs);
         groups.add(AccountLevelGroup.builder()
                                     .id(attributes.get("GroupId"))
                                     .name(attributes.get("GroupName"))
                                     .type(Type.valueOf(attributes.get("GroupType")))
                                     .recordCount(Integer.parseInt(attributes.get("RecordsCount")))
                                     .build()); 
      } 
   } 
}