public Set<Person> getPeopleWithRelationship(String name, String relationship, Person head) { Relationship relation = relationshipClassMapping.get(Enum.valueOf(RelationEnum.class, relationship.toUpperCase())); return relation.getInstance().get(head, name); }