Iterator locs = locations.iterator(); while (locs.hasNext()) { Location loc = (Location)locs.next(); if (loc.getAltId().equals(altId)) { return true; } }  return false;
return getLocation(altId) != null;
  public boolean hasAltId(String altId)  {    Iterator locs = locations.iterator();    while (locs.hasNext()) {      Location loc = (Location)locs.next();      if (loc.getAltId().equals(altId)) {	return true;      }    }    return false;  }