/** * Gets a specific part of the name * @param namePartType specific part of the name to retrieve * @return the specific part of the name that matches the given NamePartType */ public String getPart(NamePartType namePartType) { if(this.nameForms == null || this.nameForms.isEmpty() || this.nameForms.get(0) == null || this.nameForms.get(0).getParts() == null) { return null; } for(NamePart namePart : this.nameForms.get(0).getParts()) { if(namePart.getKnownType() == namePartType) { return namePart.getValue(); } } return null; }