Code example for Set

Methods: add

0
                metaData.setRoleName(getElementText(reader, propertyReplacer));
            else if (localName.equals(Element.PRINCIPAL_NAME.getLocalName())) {
                Set<String> principalNames = metaData.getPrincipals();
                if (principalNames == null) {
                    principalNames = new HashSet<String>();
                    metaData.setPrincipals(principalNames);
                } 
                principalNames.add(getElementText(reader, propertyReplacer));
            } 
            else 
                throw unexpectedElement(reader);
        } else { 
            super.processElement(metaData, reader, propertyReplacer);
        } 
    } 
 
}