public NamedLocationImpl (String name) { if (name.indexOf('|') == -1) {  this.setName(name); } else { this.setName(name.substring(0, name.indexOf('|')));  name = name.substring(name.indexOf('|') + 1); String lat = name.substring(0, name.indexOf('|')); String lon = name.substring(name.indexOf('|') + 1);  float flat = 0.0f; float flon = 0.0f; try { flat = Float.parseFloat(lat); flon = Float.parseFloat(lon); } catch (NumberFormatException nfe) { } this.setPosition(new LatLonPoint(flat, flon));  } }
public NamedLocationImpl() {}
  public NamedLocationImpl (String name) {    if (name.indexOf('|') == -1) {      //System.err.println("setting name to full thing: " + name);      this.setName(name);    } else {      this.setName(name.substring(0, name.indexOf('|')));      //System.err.println("Found composite name, set it to " + this.name);      name = name.substring(name.indexOf('|') + 1);      String lat = name.substring(0, name.indexOf('|'));      String lon = name.substring(name.indexOf('|') + 1);      //System.err.println("lat will be: " + lat + ", long: " + lon);      float flat = 0.0f;      float flon = 0.0f;      try {	flat = Float.parseFloat(lat);	flon = Float.parseFloat(lon);      } catch (NumberFormatException nfe) {      }      this.setPosition(new LatLonPoint(flat, flon));      //System.err.println("Got position: " + getPosition());    }  }