for (int i = 0; i < societies.size(); i++) { SocietyComponent sc = (SocietyComponent)societies.get(i); if (sc.getSocietyName().equals(name)) return sc; } return null;
return (SocietyComponent)societyNames.getObjectInTree(SocietyComponent.class, root, name);
  public SocietyComponent getSociety(String name) {    for (int i = 0; i < societies.size(); i++) {      SocietyComponent sc = (SocietyComponent)societies.get(i);      if (sc.getSocietyName().equals(name))        return sc;    }    return null;  }